r23012 by jghali - Small refactoring
scribus-commit
scribus-commit at lists.scribus.net
Sat Jun 8 17:27:54 UTC 2019
Author: jghali
Date: Sat Jun 8 17:27:54 2019
New Revision: 23012
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23012
Log:
Small refactoring
Modified:
trunk/Scribus/scribus/ui/inspage.cpp
Modified: trunk/Scribus/scribus/ui/inspage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23012&path=/trunk/Scribus/scribus/ui/inspage.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/inspage.cpp (original)
+++ trunk/Scribus/scribus/ui/inspage.cpp Sat Jun 8 17:27:54 2019
@@ -91,7 +91,8 @@
else
{
int row = 0;
- for (int mp = 0; mp < m_doc->pageSets()[m_doc->pagePositioning()].pageNames.count(); ++mp)
+ const PageSet& currentPageSet = m_doc->pageSets()[m_doc->pagePositioning()];
+ for (int mp = 0; mp < currentPageSet.pageNames.count(); ++mp)
{
QComboBox* pageData = new QComboBox(masterPageGroup);
// for (QMap<QString,int>::Iterator it = m_doc->MasterNames.begin(); it != m_doc->MasterNames.end(); ++it)
@@ -116,7 +117,7 @@
}
else if (mp == 1)
{
- if (m_doc->pageSets()[m_doc->pagePositioning()].pageNames.count() > 2)
+ if (currentPageSet.pageNames.count() > 2)
{
bool conNam = m_doc->MasterNames.contains( CommonStrings::trMasterPageNormalMiddle);
for (QMap<QString,int>::Iterator it = m_doc->MasterNames.begin(); it != m_doc->MasterNames.end(); ++it)
@@ -155,7 +156,7 @@
}
else if (mp == 2)
{
- if (m_doc->pageSets()[m_doc->pagePositioning()].pageNames.count() > 3)
+ if (currentPageSet.pageNames.count() > 3)
{
bool conNam = m_doc->MasterNames.contains( CommonStrings::trMasterPageNormalMiddle);
for (QMap<QString,int>::Iterator it = m_doc->MasterNames.begin(); it != m_doc->MasterNames.end(); ++it)
@@ -210,7 +211,7 @@
if (m_doc->MasterNames.contains( CommonStrings::trMasterPageNormalRight))
setCurrentComboItem(pageData, CommonStrings::trMasterPageNormalRight);
}
- QString transLabel = m_doc->pageSets()[m_doc->pagePositioning()].pageNames[mp];
+ QString transLabel = currentPageSet.pageNames[mp];
QLabel* pageLabel = new QLabel(CommonStrings::translatePageSetLocString(transLabel), masterPageGroup);
pageLabel->setBuddy(pageData);
masterPageLayout->addWidget(pageLabel, row, 0 );
More information about the scribus-commit
mailing list