r21499 by jghali - avoid unnecessary calls to PageItem currentStyle() in Hruler
scribus-commit
scribus-commit at lists.scribus.net
Mon Nov 7 13:26:09 UTC 2016
Author: jghali
Date: Mon Nov 7 13:26:08 2016
New Revision: 21499
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21499
Log:
avoid unnecessary calls to PageItem currentStyle() in Hruler
Modified:
trunk/Scribus/scribus/ui/hruler.cpp
Modified: trunk/Scribus/scribus/ui/hruler.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21499&path=/trunk/Scribus/scribus/ui/hruler.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/hruler.cpp (original)
+++ trunk/Scribus/scribus/ui/hruler.cpp Mon Nov 7 13:26:08 2016
@@ -889,18 +889,20 @@
Cols = item->Cols;
Extra = item->textToFrameDistLeft();
RExtra = item->textToFrameDistRight();
- First = item->currentStyle().firstIndent();
- Indent = item->currentStyle().leftMargin();
+
+ const ParagraphStyle& currentStyle = item->currentStyle();
+ First = currentStyle.firstIndent();
+ Indent = currentStyle.leftMargin();
double columnWidth = (item->width() - (item->columnGap() * (item->columns() - 1))
- item->textToFrameDistLeft() - item->textToFrameDistLeft()
- 2*lineCorr) / item->columns();
- RMargin = columnWidth - item->currentStyle().rightMargin();
+ RMargin = columnWidth - currentStyle.rightMargin();
if (item->imageFlippedH() || (item->reversed()))
Revers = true;
else
Revers = false;
textEditMode = true;
- TabValues = item->currentStyle().tabValues();
+ TabValues = currentStyle.tabValues();
}
void Hruler::UpdateTabList()
More information about the scribus-commit
mailing list