r22228 by jghali -
scribus-commit
scribus-commit at lists.scribus.net
Wed Nov 29 21:04:40 UTC 2017
Author: jghali
Date: Wed Nov 29 21:04:39 2017
New Revision: 22228
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22228
Log:
#15057: Scribus crash when undoing after applying "unlink text frame and cut text"
Modified:
trunk/Scribus/scribus/scribus.cpp
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22228&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Wed Nov 29 21:04:39 2017
@@ -1478,7 +1478,13 @@
const ParagraphStyle& currPStyle(inEditMode ? item->currentStyle() : item->itemText.defaultStyle());
setAlignmentValue(currPStyle.alignment());
- doc->currentStyle = item->currentStyle();
+
+ // Assignment operator does not perform style context assignment
+ // Do it in this case, otherwise we might get some crashes if previous
+ // text object was deleted or things like that
+ const ParagraphStyle& curStyle = item->currentStyle();
+ doc->currentStyle.setContext(curStyle.context());
+ doc->currentStyle = curStyle;
if (doc->appMode == modeEdit || doc->appMode == modeEditTable)
item->currentTextProps(doc->currentStyle);
else
More information about the scribus-commit
mailing list