r19348 by jghali - #12530: It is possible to delete "Normal" Master Page
scribus-commit
scribus-commit at lists.scribus.net
Wed Jul 16 20:57:46 UTC 2014
Author: jghali
Date: Wed Jul 16 20:57:46 2014
New Revision: 19348
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19348
Log:
#12530: It is possible to delete "Normal" Master Page
Modified:
trunk/Scribus/scribus/scribusdoc.cpp
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19348&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Wed Jul 16 20:57:46 2014
@@ -2324,11 +2324,11 @@
void ScribusDoc::restoreAddMasterPage(SimpleState *ss, bool isUndo)
{
QString pageName = ss->get("MASTERPAGE_NAME");
- int pageNr = ss->getInt("MASTERPAGE_NR");
-
- bool oldMPMode=masterPageMode();
+ int pageNr = ss->getInt("MASTERPAGE_NBR");
+
+ bool oldMPMode = masterPageMode();
setMasterPageMode(true);
- if(isUndo)
+ if (isUndo)
{
DummyUndoObject *duo = new DummyUndoObject();
uint did = static_cast<uint>(duo->getUId());
@@ -2348,8 +2348,8 @@
delete tmp;
scMW()->pagePalette->updateMasterPageList();
m_View->reformPages();
- setMasterPageMode(oldMPMode);
- }
+ }
+ setMasterPageMode(oldMPMode);
}
void ScribusDoc::restoreGrouping(SimpleState *state, bool isUndo)
@@ -2650,9 +2650,9 @@
MasterNames.insert(pageName, pgN);
MasterPages.insert(pgN, addedPage);
assert(MasterPages.at(pgN)!=NULL);
- if (!isLoading())
+ if (!isLoading())
changed();
- if(UndoManager::undoEnabled())
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::NewMasterPage, "", Um::IDocument);
ss->set("MASTERPAGE_ADD", "masterpage_add");
@@ -4898,9 +4898,10 @@
--destLocation;
}
}
- else{
+ else
+ {
copyPage(pnum, extPage, whereTo, copyCount);
- if(m_ScMW->outlinePalette->isVisible())
+ if (m_ScMW->outlinePalette->isVisible())
m_ScMW->outlinePalette->BuildTree();
}
More information about the scribus-commit
mailing list