Jean-Marc Lasgouttes wrote:
> It looks OK. The alternative is not to disable the parent button, but
> only the individual entries at display time.

I think this would be rather confusing.
I'm tempted to commit the attached version of Edwin's patch.

Jürgen
Index: src/frontends/qt4/IconPalette.cpp
===================================================================
--- src/frontends/qt4/IconPalette.cpp	(Revision 20624)
+++ src/frontends/qt4/IconPalette.cpp	(Arbeitskopie)
@@ -208,11 +208,20 @@
 void IconPalette::updateParent()
 {
 	bool enable = false;
+
+	// FIXME: so this is commented out for speed considerations
+	// true fix is to repair the updating mechanism of the toolbar
+#if 0
 	for (int i = 0; i < actions_.size(); ++i)
-		if (actions_.at(i)->isEnabled()) {
-			enable = true;
-			break;
-		}
+ 		if (actions_.at(i)->isEnabled()) {
+ 			enable = true;
+ 			break;
+ 		}
+#else
+	// we check only the first action to enable/disable the panel
+	if (actions_.size() > 0)
+		enable = actions_.at(0)->isEnabled();
+#endif
 
 	parentWidget()->setEnabled(enable);
 }

Reply via email to