r16799 by jghali - #10211: Undoing last page deletion crashes Scribus
scribus-commit
scribus-commit at lists.scribus.net
Wed Aug 24 22:05:10 UTC 2011
Author: jghali
Date: Wed Aug 24 22:05:10 2011
New Revision: 16799
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16799
Log:
#10211: Undoing last page deletion crashes Scribus
Modified:
trunk/Scribus/scribus/scribus.cpp
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16799&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Wed Aug 24 22:05:10 2011
@@ -5507,7 +5507,18 @@
undoManager->setUndoEnabled(false);
QStringList base;
- if (basedOn == NULL)
+ if (basedOn != NULL)
+ {
+ base = *basedOn;
+ // #10211 case when restoring page deletion, basedOn contains only masterpage name
+ if (base.count() == 1)
+ {
+ int setcol = doc->pageSets()[doc->pagePositioning()].Columns;
+ while (base.count() < setcol)
+ base.append (base.at(0));
+ }
+ }
+ if (base.empty())
{
int setcol = doc->pageSets()[doc->pagePositioning()].Columns;
if (setcol == 1)
@@ -5531,8 +5542,6 @@
base.append( CommonStrings::trMasterPageNormalRight);
}
}
- else
- base = *basedOn;
int cc;
int wot = wo;
if (where==0)
More information about the scribus-commit
mailing list