r22693 by jghali - fix unused variable warning

scribus-commit scribus-commit at lists.scribus.net
Thu Sep 13 16:53:16 UTC 2018


Author: jghali
Date: Thu Sep 13 16:53:15 2018
New Revision: 22693

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22693
Log:
fix unused variable warning

Modified:
    trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22693&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp	Thu Sep 13 16:53:15 2018
@@ -119,8 +119,8 @@
 	if (!checkHaveDocument())
 		return nullptr;
 
-	ScribusDoc* currentDoc = ScCore->primaryMainWindow()->doc;
-	ScribusView* currentView = ScCore->primaryMainWindow()->view;
+	ScribusMainWindow* mainWin = ScCore->primaryMainWindow();
+	ScribusDoc* currentDoc = ScCore->primaryMainWindow()->doc;
 
 	int loc = (e > -1) ? e : currentDoc->Pages->count();
 	if (currentDoc->pageSets()[currentDoc->pagePositioning()].Columns != 1)
@@ -147,7 +147,7 @@
 		return nullptr;
 	}
 	if (e < 0)
-		ScCore->primaryMainWindow()->slotNewPageP(loc, qName);
+		mainWin->slotNewPageP(loc, qName);
 	else
 	{
 		e--;
@@ -156,7 +156,7 @@
 			PyErr_SetString(PyExc_IndexError, QObject::tr("Page number out of range.","python error").toLocal8Bit().constData());
 			return nullptr;
 		}
-		ScCore->primaryMainWindow()->slotNewPageP(e, qName);
+		mainWin->slotNewPageP(e, qName);
 	}
 // 	Py_INCREF(Py_None);
  //	return Py_None;




More information about the scribus-commit mailing list