r23934 by jghali - Fix two cases of setUndoEnabled() calls being incorrectly balanced

scribus-commit scribus-commit at lists.scribus.net
Mon Jul 20 05:22:53 UTC 2020


Author: jghali
Date: Mon Jul 20 05:22:53 2020
New Revision: 23934

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23934
Log:
Fix two cases of setUndoEnabled() calls being incorrectly balanced

Modified:
    trunk/Scribus/scribus/scribus.cpp

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23934&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Mon Jul 20 05:22:53 2020
@@ -9148,7 +9148,6 @@
 	doc->SnapGrid  = false;
 	doc->SnapGuides = false;
 	doc->SnapElement = false;
-	bool wasUndo = m_undoManager->undoEnabled();
 	m_undoManager->setUndoEnabled(false);
 	slotElemRead(buffer, 0, 0, false, true, doc, view);
 	doc->SnapGrid  = savedAlignGrid;
@@ -9184,7 +9183,7 @@
 	*doc->m_Selection=tempSelection;
 	doc->minCanvasCoordinate = minSize;
 	doc->maxCanvasCoordinate = maxSize;
-	m_undoManager->setUndoEnabled(wasUndo);
+	m_undoManager->setUndoEnabled(true);
 	inlinePalette->unsetDoc();
 	inlinePalette->setDoc(doc);
 	if (outlinePalette->isVisible())
@@ -9208,7 +9207,6 @@
 	doc->SnapGrid  = false;
 	doc->SnapGuides = false;
 	doc->SnapElement = false;
-	bool wasUndo = m_undoManager->undoEnabled();
 	m_undoManager->setUndoEnabled(false);
 	internalCopy = true;
 	slotEditCopy();
@@ -9247,7 +9245,7 @@
 	*doc->m_Selection=tempSelection;
 	doc->minCanvasCoordinate = minSize;
 	doc->maxCanvasCoordinate = maxSize;
-	m_undoManager->setUndoEnabled(wasUndo);
+	m_undoManager->setUndoEnabled(true);
 	inlinePalette->unsetDoc();
 	inlinePalette->setDoc(doc);
 	if (outlinePalette->isVisible())




More information about the scribus-commit mailing list