From 1e365fe31521d23b39129a8d72e19c2a7c17e6da Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Fri, 15 Nov 2013 01:03:14 -0500 Subject: [PATCH] Focus on custom line edit when custom is selected Do so for the horizontal and vertical space dialogs. --- src/frontends/qt4/GuiHSpace.cpp | 2 ++ src/frontends/qt4/GuiVSpace.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/frontends/qt4/GuiHSpace.cpp b/src/frontends/qt4/GuiHSpace.cpp index fc09f51dc3..57d4e982e0 100644 --- a/src/frontends/qt4/GuiHSpace.cpp +++ b/src/frontends/qt4/GuiHSpace.cpp @@ -104,6 +104,8 @@ void GuiHSpace::enableWidgets() QString const selection = spacingCO->itemData(spacingCO->currentIndex()).toString(); bool const custom = selection == "custom"; valueLE->setEnabled(custom); + if (custom) + valueLE->setFocus(); valueL->setEnabled(custom); unitCO->setEnabled(custom); fillPatternCO->setEnabled(!math_mode_ && selection == "hfill"); diff --git a/src/frontends/qt4/GuiVSpace.cpp b/src/frontends/qt4/GuiVSpace.cpp index cbf9029fac..4f2a60e526 100644 --- a/src/frontends/qt4/GuiVSpace.cpp +++ b/src/frontends/qt4/GuiVSpace.cpp @@ -65,6 +65,8 @@ void GuiVSpace::enableCustom(int selection) { bool const enable = selection == 5; valueLE->setEnabled(enable); + if (enable) + valueLE->setFocus(); valueL->setEnabled(enable); unitCO->setEnabled(enable); changed(); -- 2.39.2