Focus on custom line edit when custom is selected

Do so for the horizontal and vertical space dialogs.
This commit is contained in:
Scott Kostyshak 2013-11-15 01:03:14 -05:00
parent de800ad149
commit 1e365fe315
2 changed files with 4 additions and 0 deletions

View File

@ -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");

View File

@ -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();