r15326 by cbradney - #9249: Update style manager colour lists when we update others too, still to check out scribus.cpp for more uses for this

scribus-commit scribus-commit at lists.scribus.net
Mon Jul 12 23:50:45 CEST 2010


Revision: 15326
Author: cbradney
Date: 2010-07-12T21:47:19.560888Z
Commit message: #9249: Update style manager colour lists when we update others too, still to check out scribus.cpp for more uses for this

Changeset: 
M  /trunk/Scribus/scribus/scribus.cpp
M  /trunk/Scribus/scribus/canvasmode_eyedropper.cpp
M  /trunk/Scribus/scribus/scribus.h

Diffs:
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp	(revision 15325)
+++ scribus/scribus.cpp	(revision 15326)
@@ -3388,6 +3388,16 @@
 	}
 }
 
+void ScribusMainWindow::updateColorLists()
+{
+	if (HaveDoc)
+	{
+		propertiesPalette->updateColorList();
+		propertiesPalette->SetLineFormats(doc);
+		styleManager->updateColorList();
+	}
+}
+
 bool ScribusMainWindow::slotDocOpen()
 {
 	PrefsContext* docContext = prefsManager->prefsFile->getContext("docdirs", false);
@@ -9955,10 +9965,13 @@
 			}
 			doc->recalculateColors();
 			doc->recalcPicturesRes();
+			updateColorLists();
+			/*
 			propertiesPalette->updateColorList();
 			//3102: update the line styles in PP too
 			propertiesPalette->SetLineFormats(doc);
 			styleManager->updateColorList();
+			*/
 			if (doc->m_Selection->count() != 0)
 				doc->m_Selection->itemAt(0)->emitAllToGUI();
 			view->DrawNew();
Index: scribus/canvasmode_eyedropper.cpp
===================================================================
--- scribus/canvasmode_eyedropper.cpp	(revision 15325)
+++ scribus/canvasmode_eyedropper.cpp	(revision 15326)
@@ -179,7 +179,8 @@
 		{
 			ScColor newColor(selectedColor.red(), selectedColor.green(), selectedColor.blue());
 			m_doc->PageColors[colorName]=newColor;
-			m_ScMW->propertiesPalette->updateColorList();
+			m_ScMW->updateColorLists();
+//			m_ScMW->propertiesPalette->updateColorList();
 		}
 		else
 			colorName=QString::null;
Index: scribus/scribus.h
===================================================================
--- scribus/scribus.h	(revision 15325)
+++ scribus/scribus.h	(revision 15326)
@@ -528,6 +528,7 @@
 	void insertSampleText();
 	//void sendToLayer(int layerNumber);
 	void updateItemLayerList();
+	void updateColorLists();
 	/*! \brief Apply changes from ReformDoc dialog.
 	It's called from this->slotDocSetup() or from ReformDoc directly.
 	\param dia a reference to the ReformDoc dialog */




More information about the scribus-commit mailing list