r19286 by jghali - #12441: Page > Delete... should not be clickable if the document has only 1 page
scribus-commit
scribus-commit at lists.scribus.net
Thu Jun 26 17:53:47 UTC 2014
Author: jghali
Date: Thu Jun 26 17:53:47 2014
New Revision: 19286
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19286
Log:
#12441: Page > Delete... should not be clickable if the document has only 1 page
Modified:
trunk/Scribus/scribus/scribusdoc.cpp
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19286&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Thu Jun 26 17:53:47 2014
@@ -187,6 +187,11 @@
return;
}
m_docChangeNeeded = true;
+ }
+
+ void setDocChangeNeeded(bool changeNeeded = true)
+ {
+ m_docChangeNeeded = changeNeeded;
}
};
@@ -13702,10 +13707,12 @@
// Do not emit docChanged signal() unnecessarily
// Processing of that signal is slowwwwwww and
// DocUpdater will trigger it when necessary
- if (!m_docUpdater->inUpdateSession())
- {
- emit docChanged();
- }
+ if (m_docUpdater->inUpdateSession())
+ {
+ m_docUpdater->setDocChangeNeeded();
+ return;
+ }
+ emit docChanged();
}
void ScribusDoc::invalidateAll()
@@ -15450,7 +15457,8 @@
currItem = toDelete.at(i);
if (currItem->isWelded())
currItem->unWeld();
- delete currItem;
+ if (currItem->undoStateCount() <= 0)
+ delete currItem;
}
if (activeTransaction)
{
More information about the scribus-commit
mailing list