r21948 by jghali - #12276: some adjustments to avoid unwanted concatenation of text undo actions

scribus-commit scribus-commit at lists.scribus.net
Fri Apr 21 10:04:32 UTC 2017


Author: jghali
Date: Fri Apr 21 10:04:32 2017
New Revision: 21948

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21948
Log:
#12276: some adjustments to avoid unwanted concatenation of text undo actions

Modified:
    trunk/Scribus/scribus/pageitem_textframe.cpp

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21948&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp	Fri Apr 21 10:04:32 2017
@@ -4710,12 +4710,17 @@
 					undoTarget = m_Doc;
 				ip = new ScItemState<ParagraphStyle>(Um::DeleteText, "", Um::IDelete);
 				ip->set("DELETE_FRAMEPARA");
+				ip->set("ETEA", "delete_framepara");
 				ip->set("START", start);
 				ip->setItem(itemText.paragraphStyle(i));
 				lastPos = i + 1;
 				if (lastPos < itemText.length())
 					lastParent = itemText.charStyle(lastPos);
-				if (ts)
+				QString etea;
+				SimpleState* ss = ts ? dynamic_cast<SimpleState*>(ts->last()) : NULL;
+				if (ss)
+					etea = ss->get("ETEA");
+				if (ts && (etea == "delete_frametext") || (etea == "delete_framepara"))
 					ts->pushBack(undoTarget, ip);
 				else
 					undoManager->action(undoTarget, ip);




More information about the scribus-commit mailing list