[qet] [1885] ConductorPropertiesWidget: fixed a UI consistency bug.

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 1885
Author:   xavier
Date:     2012-06-29 07:21:47 +0200 (Fri, 29 Jun 2012)
Log Message:
-----------
ConductorPropertiesWidget: fixed a UI consistency bug.

Modified Paths:
--------------
    trunk/sources/conductorpropertieswidget.cpp

Modified: trunk/sources/conductorpropertieswidget.cpp
===================================================================
--- trunk/sources/conductorpropertieswidget.cpp	2012-06-29 05:21:46 UTC (rev 1884)
+++ trunk/sources/conductorpropertieswidget.cpp	2012-06-29 05:21:47 UTC (rev 1885)
@@ -45,7 +45,7 @@
 /// construit l'interface du widget
 void ConductorPropertiesWidget::buildInterface() {
 	
-	setFocusPolicy(Qt::StrongFocus);	
+	setFocusPolicy(Qt::StrongFocus);
 	setMinimumSize(380, 350);
 	
 	QVBoxLayout *main_layout = new QVBoxLayout(this);
@@ -281,6 +281,7 @@
 	@param ro true pour passer ce widget en lecture seule, false sinon
 */
 void ConductorPropertiesWidget::setReadOnly(bool ro) {
+	// enable or disable all child widgets according to the read only state
 	simple    -> setDisabled(ro);
 	multiline -> setDisabled(ro);
 	singleline -> setDisabled(ro);
@@ -291,6 +292,10 @@
 	neutral_checkbox -> setDisabled(ro);
 	color_button -> setDisabled(ro);
 	dashed_checkbox -> setDisabled(ro);
+	// if the widget is not read-only, we still need to disable some widgets for consistency
+	if (!ro) {
+		updateDisplay();
+	}
 }
 
 /**


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/