On Wed, Nov 13, 2013 at 2:38 AM, Scott Kostyshak <skost...@lyx.org> wrote: > On Wed, Nov 13, 2013 at 2:08 AM, Jürgen Spitzmüller <sp...@lyx.org> wrote: >> 2013/11/12 Scott Kostyshak >> >>> Same fix for vertical space? >> >> >> Yes, if it is needed. Do you want to have a go? > > Sure, I'll take a look tomorrow.
I'm not sure why your patch to CheckedWidget::check() does not carry over to VSpace. Less important, I cannot figure out an minor initialization issue. With the attached patch, going to Insert > Formatting > Vertical Space, valueL is incorrectly enabled when the dialog is first opened. When I change the combo box then it is correctly enabled/disabled. I don't know why it is enabled on the first open. Attached is my patch (setting it in the .ui does nothing so I'm guessing it should eventually be removed but I wanted to show what I tried). Any ideas? Scott
From b0970233568db1196863a8e91bca07956b080542 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak <skost...@lyx.org> Date: Thu, 14 Nov 2013 01:16:43 -0500 Subject: [PATCH] Do not validate custom value if it is disabled Continuing on 7e22abec. --- src/frontends/qt4/GuiVSpace.cpp | 1 + src/frontends/qt4/ui/VSpaceUi.ui | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/frontends/qt4/GuiVSpace.cpp b/src/frontends/qt4/GuiVSpace.cpp index dc08bc0..31bf5d1 100644 --- a/src/frontends/qt4/GuiVSpace.cpp +++ b/src/frontends/qt4/GuiVSpace.cpp @@ -64,6 +64,7 @@ void GuiVSpace::enableCustom(int selection) { bool const enable = selection == 5; valueLE->setEnabled(enable); + valueL->setEnabled(enable); unitCO->setEnabled(enable); } diff --git a/src/frontends/qt4/ui/VSpaceUi.ui b/src/frontends/qt4/ui/VSpaceUi.ui index 0e4a83d..b216ff8 100644 --- a/src/frontends/qt4/ui/VSpaceUi.ui +++ b/src/frontends/qt4/ui/VSpaceUi.ui @@ -64,6 +64,9 @@ </item> <item row="1" column="0"> <widget class="QLabel" name="valueL"> + <property name="enabled"> + <bool>false</bool> + </property> <property name="text"> <string>&Value:</string> </property> -- 1.8.1.2