From d685c56f2150eb3eeec3d53070a22a9cb85a6bf7 Mon Sep 17 00:00:00 2001 From: xavier Date: Fri, 29 Jun 2012 05:21:47 +0000 Subject: [PATCH] ConductorPropertiesWidget: fixed a UI consistency bug. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@1885 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/conductorpropertieswidget.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sources/conductorpropertieswidget.cpp b/sources/conductorpropertieswidget.cpp index b38553ed2..6136e2728 100644 --- a/sources/conductorpropertieswidget.cpp +++ b/sources/conductorpropertieswidget.cpp @@ -45,7 +45,7 @@ ConductorPropertiesWidget::ConductorPropertiesWidget(const ConductorProperties & /// 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 @@ bool ConductorPropertiesWidget::isReadOnly() const { @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 @@ void ConductorPropertiesWidget::setReadOnly(bool ro) { 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(); + } } /**