r22157 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Mon Sep 11 22:45:14 UTC 2017


Author: jghali
Date: Mon Sep 11 22:45:14 2017
New Revision: 22157

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22157
Log:
fix undo of item conversions not working correctly

Modified:
    trunk/Scribus/scribus/scpage.cpp
    trunk/Scribus/scribus/scpage.h

Modified: trunk/Scribus/scribus/scpage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22157&path=/trunk/Scribus/scribus/scpage.cpp
==============================================================================
--- trunk/Scribus/scribus/scpage.cpp	(original)
+++ trunk/Scribus/scribus/scpage.cpp	Mon Sep 11 22:45:14 2017
@@ -212,9 +212,9 @@
 		else if (ss->contains("DELETE_ITEM"))
 			restorePageItemDeletion(dynamic_cast<ScItemState< QList<PageItem*> >*>(ss), isUndo);
 		else if (ss->contains("CONVERT_ITEM"))
-			restorePageItemConversion(dynamic_cast<ScItemState<std::pair<PageItem*, PageItem*> >*>(ss), isUndo);
+			restorePageItemConversion(dynamic_cast<ScItemState<QPair<PageItem*, PageItem*> >*>(ss), isUndo);
 		else if (ss->contains("CONVERT_ITEM_TO_SYMBOL"))
-			restorePageItemConversionToSymbol(dynamic_cast<ScItemState<std::pair<PageItem*, PageItem*> >*>(ss), isUndo);
+			restorePageItemConversionToSymbol(dynamic_cast<ScItemState<QPair<PageItem*, PageItem*> >*>(ss), isUndo);
 		else if (ss->contains("PAGE_ATTRS"))
 			restorePageAttributes(ss, isUndo);
 	}
@@ -402,7 +402,7 @@
 	m_Doc->m_Selection->delaySignalsOff();
 }
 
-void ScPage::restorePageItemConversion(ScItemState<std::pair<PageItem*, PageItem*> >*state, bool isUndo)
+void ScPage::restorePageItemConversion(ScItemState<QPair<PageItem*, PageItem*> >*state, bool isUndo)
 {
 	if (!state)
 		return;
@@ -424,7 +424,7 @@
 	m_Doc->setMasterPageMode(oldMPMode);
 }
 
-void ScPage::restorePageItemConversionToSymbol(ScItemState<std::pair<PageItem*, PageItem*> >* state, bool isUndo)
+void ScPage::restorePageItemConversionToSymbol(ScItemState<QPair<PageItem*, PageItem*> >* state, bool isUndo)
 {
 	//#11365... this code is not finished and broken... fixing will fix 11365
 	if (!state)

Modified: trunk/Scribus/scribus/scpage.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22157&path=/trunk/Scribus/scribus/scpage.h
==============================================================================
--- trunk/Scribus/scribus/scpage.h	(original)
+++ trunk/Scribus/scribus/scpage.h	Mon Sep 11 22:45:14 2017
@@ -27,6 +27,7 @@
 #include <utility>
 
 #include <QList>
+#include <QPair>
 
 #include "scribusapi.h"
 #include "undostate.h"
@@ -104,8 +105,8 @@
 	void restorePageItemCreation(ScItemState<PageItem*> *state, bool isUndo);
 	void restorePageItemDeletion(ScItemState< QList<PageItem*> > *state, bool isUndo);
 	void restorePageAttributes(SimpleState *state, bool isUndo);
-	void restorePageItemConversion(ScItemState<std::pair<PageItem*, PageItem*> >*state, bool isUndo);
-	void restorePageItemConversionToSymbol(ScItemState<std::pair<PageItem*, PageItem*> >*state, bool isUndo);
+	void restorePageItemConversion(ScItemState<QPair<PageItem*, PageItem*> >*state, bool isUndo);
+	void restorePageItemConversionToSymbol(ScItemState<QPair<PageItem*, PageItem*> >*state, bool isUndo);
 
 	double m_xOffset;
 	double m_yOffset;




More information about the scribus-commit mailing list