r15695 by fschmid - Made the sort setting for the color listboxes application global.

scribus-commit scribus-commit at lists.scribus.net
Sat Oct 30 11:38:30 CEST 2010


Author: fschmid
Date: Sat Oct 30 09:38:30 2010
New Revision: 15695

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15695
Log:
Made the sort setting for the color listboxes application global.

Modified:
    trunk/Scribus/scribus/ui/colorlistbox.cpp
    trunk/Scribus/scribus/ui/colorlistbox.h

Modified: trunk/Scribus/scribus/ui/colorlistbox.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15695&path=/trunk/Scribus/scribus/ui/colorlistbox.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/colorlistbox.cpp (original)
+++ trunk/Scribus/scribus/ui/colorlistbox.cpp Sat Oct 30 09:38:30 2010
@@ -188,11 +188,16 @@
 }
 
 
+int ColorListBox::initialized;
+int ColorListBox::sortRule;
+
 ColorListBox::ColorListBox(QWidget * parent)
 	: QListWidget(parent)
 {
 	cList = NULL;
-	sortRule = 0;
+	if (initialized != 12345)
+		sortRule = 0;
+	initialized = 12345;
 	setItemDelegate(new ColorWideItemDelegate());
 	connect(this, SIGNAL(showContextMenue()), this, SLOT(slotRightClick()));
 }

Modified: trunk/Scribus/scribus/ui/colorlistbox.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15695&path=/trunk/Scribus/scribus/ui/colorlistbox.h
==============================================================================
--- trunk/Scribus/scribus/ui/colorlistbox.h (original)
+++ trunk/Scribus/scribus/ui/colorlistbox.h Sat Oct 30 09:38:30 2010
@@ -120,7 +120,8 @@
 		void showContextMenue();
 	protected:
 		bool viewportEvent(QEvent *event);
-		int sortRule;
+		static int initialized;
+		static int sortRule;
 		int m_selectedRow;
 		ColorListBox::PixmapType m_type;
 };




More information about the scribus-commit mailing list