r17725 by jghali - #10898: more readable code
scribus-commit
scribus-commit at lists.scribus.net
Sat Jul 21 09:58:34 UTC 2012
Author: jghali
Date: Sat Jul 21 09:58:34 2012
New Revision: 17725
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17725
Log:
#10898: more readable code
Modified:
trunk/Scribus/scribus/ui/hruler.cpp
Modified: trunk/Scribus/scribus/ui/hruler.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17725&path=/trunk/Scribus/scribus/ui/hruler.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/hruler.cpp (original)
+++ trunk/Scribus/scribus/ui/hruler.cpp Sat Jul 21 09:58:34 2012
@@ -921,16 +921,16 @@
tb.tabPosition = TabValues[ActTab].tabPosition;
tb.tabType = TabValues[ActTab].tabType;
tb.tabFillChar = TabValues[ActTab].tabFillChar;
- int gg = static_cast<int>(TabValues.count());
- int g = gg;
+ int tab_n = static_cast<int>(TabValues.count());
+ int tab_i = tab_n;
TabValues.removeAt(ActTab);
- for (int yg = static_cast<int>(TabValues.count()-1); yg > -1; yg--)
- {
- if (tb.tabPosition < TabValues[yg].tabPosition)
- g = yg;
- }
- ActTab = g;
- if (gg == g)
+ for (int i = static_cast<int>(TabValues.count()-1); i > -1; --i)
+ {
+ if (tb.tabPosition < TabValues[i].tabPosition)
+ tab_i = i;
+ }
+ ActTab = tab_i;
+ if (tab_n == tab_i)
{
TabValues.append(tb);
ActTab = static_cast<int>(TabValues.count()-1);
More information about the scribus-commit
mailing list