r23455 by jghali - Small optimization for ScribusDoc::updateNumbers()

scribus-commit scribus-commit at lists.scribus.net
Fri Jan 31 21:40:00 UTC 2020


Author: jghali
Date: Fri Jan 31 21:40:00 2020
New Revision: 23455

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23455
Log:
Small optimization for ScribusDoc::updateNumbers()

Modified:
    trunk/Scribus/scribus/scribusdoc.cpp

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23455&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp	(original)
+++ trunk/Scribus/scribus/scribusdoc.cpp	Fri Jan 31 21:40:00 2020
@@ -16913,8 +16913,9 @@
 								continue;
 							}
 							Mark* mark = item->itemText.mark(pos);
+							NumStruct* numStyle = numerations.value(style.numName());
 							bool resetNums = false;
-							if (numerations.value(style.numName())->m_lastlevel == -1)
+							if (numStyle->m_lastlevel == -1)
 								resetNums = true;
 							else if (style.numOther())
 							{
@@ -16923,11 +16924,11 @@
 								if (!preStyle.hasNum() || (preStyle.numName() != style.numName()))
 									resetNums = true;
 							}
-							else if (style.numHigher() && (style.numLevel() > numerations.value(style.numName())->m_lastlevel))
+							else if (style.numHigher() && (style.numLevel() > numStyle->m_lastlevel))
 								resetNums = true;
 							
 							QString prefixStr = getNumberStr(style.numName(), style.numLevel(), resetNums, style);
-							numerations.value(style.numName())->m_lastlevel = style.numLevel();
+							numStyle->m_lastlevel = style.numLevel();
 							if (mark == nullptr)
 							{
 								BulNumMark* bnMark = new BulNumMark;




More information about the scribus-commit mailing list