r15327 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:51:08 CEST 2010


Revision: 15327
Author: cbradney
Date: 2010-07-12T21:47:25.144126Z
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  /branches/Version135/Scribus/scribus/scribus.cpp
M  /branches/Version135/Scribus/scribus/canvasmode_eyedropper.cpp
M  /branches/Version135/Scribus/scribus/scribus.h

Diffs:
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp	(revision 15326)
+++ scribus/scribus.cpp	(revision 15327)
@@ -3665,6 +3665,17 @@
 	}
 }
 
+void ScribusMainWindow::updateColorLists()
+{
+	if (HaveDoc)
+	{
+		propertiesPalette->updateColorList();
+		propertiesPalette->SetLineFormats(doc);
+		styleManager->updateColorList();
+	}
+}
+
+
 bool ScribusMainWindow::slotDocOpen()
 {
 	PrefsContext* docContext = prefsManager->prefsFile->getContext("docdirs", false);
@@ -7385,9 +7396,12 @@
 			doc->replaceLineStyleColors(dia2->replaceMap);
 			doc->recalculateColors();
 			doc->recalcPicturesRes();
+			updateColorLists();
+			/*			
 			propertiesPalette->updateColorList();
 			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 15326)
+++ scribus/canvasmode_eyedropper.cpp	(revision 15327)
@@ -179,7 +179,7 @@
 		{
 			ScColor newColor(selectedColor.red(), selectedColor.green(), selectedColor.blue());
 			m_doc->PageColors[colorName]=newColor;
-			m_ScMW->propertiesPalette->updateColorList();
+			m_ScMW->updateColorLists();
 		}
 		else
 			colorName=QString::null;
Index: scribus/scribus.h
===================================================================
--- scribus/scribus.h	(revision 15326)
+++ scribus/scribus.h	(revision 15327)
@@ -524,6 +524,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