r17387 by fschmid - Activating the real power to the properties palette change: now you can have more than one tab open at a time.

scribus-commit scribus-commit at lists.scribus.net
Sun Mar 18 21:35:20 UTC 2012


Author: fschmid
Date: Sun Mar 18 21:35:20 2012
New Revision: 17387

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17387
Log:
Activating the real power to the properties palette change: now you can have more than one tab open at a time.

Modified:
    trunk/Scribus/scribus/ui/propertiespalette.cpp
    trunk/Scribus/scribus/ui/sctreewidget.cpp

Modified: trunk/Scribus/scribus/ui/propertiespalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17387&path=/trunk/Scribus/scribus/ui/propertiespalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette.cpp Sun Mar 18 21:35:20 2012
@@ -85,7 +85,8 @@
 	setFont(f);
 
 	TabStack = new ScTreeWidget( this );
-	TabStack->setToolBoxMode(true);
+//	Uncomment this line if the new behaviour makes any trouble.
+//	TabStack->setToolBoxMode(true);
 
 	xyzPal = new PropertiesPalette_XYZ( this );
 	idXYZItem = TabStack->addItem( xyzPal, "X, Y, &Z" );
@@ -390,6 +391,7 @@
 		TabStack->setItemEnabled(idColorsItem, false);
 		TabStack->setItemEnabled(idTextItem, false);
 		TabStack->setItemEnabled(idImageItem, false);
+		TabStack->setItemEnabled(idTableItem, false);
 	}
 	else
 		TabStack->setItemEnabled(idGroupItem, false);
@@ -422,6 +424,7 @@
 		TabStack->setItemEnabled(idTransparencyItem, false);
 		TabStack->setItemEnabled(idTextItem, false);
 		TabStack->setItemEnabled(idImageItem, false);
+		TabStack->setItemEnabled(idTableItem, false);
 	}
 	if (m_item->asSymbolFrame())
 	{
@@ -433,6 +436,7 @@
 		TabStack->setItemEnabled(idTextItem, false);
 		TabStack->setItemEnabled(idImageItem, false);
 		TabStack->setItemEnabled(idTransparencyItem, false);
+		TabStack->setItemEnabled(idTableItem, false);
 	}
 	connect(TabStack, SIGNAL(currentChanged(int)), this, SLOT(SelTab(int)));
 }
@@ -471,6 +475,7 @@
 		TabStack->setItemEnabled(idXYZItem, true);
 		TabStack->setItemEnabled(idColorsItem, true);
 		TabStack->setItemEnabled(idTransparencyItem, true);
+		TabStack->setItemEnabled(idTableItem, false);
 		switch (itemType)
 		{
 		case -1:
@@ -492,7 +497,6 @@
 				TabStack->setItemEnabled(idLineItem, false);
 				TabStack->setItemEnabled(idColorsItem, true);
 				TabStack->setItemEnabled(idTransparencyItem, false);
-				TabStack->setItemEnabled(idTableItem, false);
 				TabStack->setItemEnabled(idTextItem, false);
 				TabStack->setItemEnabled(idImageItem, false);
 			}

Modified: trunk/Scribus/scribus/ui/sctreewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17387&path=/trunk/Scribus/scribus/ui/sctreewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/sctreewidget.cpp (original)
+++ trunk/Scribus/scribus/ui/sctreewidget.cpp Sun Mar 18 21:35:20 2012
@@ -50,7 +50,6 @@
 		buttonOption.state &= ~QStyle::State_HasFocus;
 		buttonOption.rect = option.rect;
 		buttonOption.palette = option.palette;
-		buttonOption.features = QStyleOptionButton::None;
 		m_view->style()->drawControl(QStyle::CE_PushButton, &buttonOption, painter, m_view);
 		static const int i = 9; // ### hardcoded in qcommonstyle.cpp
 		QRect r = option.rect;
@@ -171,6 +170,9 @@
 		topLevelItem(index)->setFlags(Qt::ItemIsEnabled);
 	else
 		topLevelItem(index)->setFlags(0);
+	QTreeWidgetItem *child = topLevelItem(index)->child(0);
+	if (child != NULL)
+		itemWidget(child, 0)->setEnabled(enable);
 }
 
 bool ScTreeWidget::isItemEnabled(int index)




More information about the scribus-commit mailing list