r21143 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Fri Apr 1 00:19:22 UTC 2016


Author: jghali
Date: Fri Apr  1 00:19:22 2016
New Revision: 21143

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21143
Log:
#12658: Activating colour management and/or preview mode for colour blindness is extremely slow and a resource hog

Modified:
    trunk/Scribus/scribus/scribusdoc.cpp

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21143&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp	(original)
+++ trunk/Scribus/scribus/scribusdoc.cpp	Fri Apr  1 00:19:22 2016
@@ -4970,6 +4970,9 @@
 
 void ScribusDoc::recalculateColors()
 {
+	// #12658, #13889 : disable undo temporarily, there is nothing to cancel here
+	m_undoManager->setUndoEnabled(false);
+
 	//Adjust Items of the 3 types to the colors
 	QHash<QString, VGradient>::Iterator itGrad;
 	for (itGrad = docGradients.begin(); itGrad != docGradients.end(); ++itGrad)
@@ -5104,6 +5107,8 @@
 		maxy = qMax(maxy, y2);
 		docPatterns[patterns[c]].pattern = ite->DrawObj_toImage(qMin(qMax(maxx - minx, maxy - miny), 500.0));
 	}
+
+	m_undoManager->setUndoEnabled(true);
 }
 
 bool ScribusDoc::copyPageToMasterPage(const int pageNumber, const int leftPage, const int maxLeftPage,  const QString& masterPageName, bool copyFromAppliedMaster)




More information about the scribus-commit mailing list