r22688 by jghali - #15424: pattern background not rendered after duplicating an item with a pattern background

scribus-commit scribus-commit at lists.scribus.net
Thu Sep 13 11:56:23 UTC 2018


Author: jghali
Date: Thu Sep 13 11:56:23 2018
New Revision: 22688

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22688
Log:
#15424: pattern background not rendered after duplicating an item with a pattern background

Modified:
    trunk/Scribus/scribus/scpattern.cpp

Modified: trunk/Scribus/scribus/scpattern.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22688&path=/trunk/Scribus/scribus/scpattern.cpp
==============================================================================
--- trunk/Scribus/scribus/scpattern.cpp	(original)
+++ trunk/Scribus/scribus/scpattern.cpp	Thu Sep 13 11:56:23 2018
@@ -90,8 +90,12 @@
 void ScPattern::createPreview()
 {
 	double sc = 500.0 / qMax(width, height);
+
 	bool savedFlag = doc->guidesPrefs().framesShown;
+	bool savedDoDrawing = doc->DoDrawing;
 	doc->guidesPrefs().framesShown = false;
+	doc->DoDrawing = true;
+
 	pattern = QImage(qRound(width * sc), qRound(height * sc), QImage::Format_ARGB32_Premultiplied);
 	pattern.fill( qRgba(0, 0, 0, 0) );
 	ScPainter *painter = new ScPainter(&pattern, pattern.width(), pattern.height(), 1, 0);
@@ -109,5 +113,7 @@
 	}
 	painter->end();
 	delete painter;
+
+	doc->DoDrawing = savedDoDrawing;
 	doc->guidesPrefs().framesShown = savedFlag;
 }




More information about the scribus-commit mailing list