From 4d80cd60ea965cd4569ebbbf0cf4700beebf313a Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Mon, 25 Jun 2018 10:34:57 +0200 Subject: [PATCH] GuiTabular: set focus on column width LE if custom is selected --- src/frontends/qt4/GuiTabular.cpp | 10 ++++++++-- src/frontends/qt4/GuiTabular.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/frontends/qt4/GuiTabular.cpp b/src/frontends/qt4/GuiTabular.cpp index 78c237d332..973bba0aab 100644 --- a/src/frontends/qt4/GuiTabular.cpp +++ b/src/frontends/qt4/GuiTabular.cpp @@ -131,8 +131,6 @@ GuiTabular::GuiTabular(QWidget * parent) this, SLOT(checkEnabled())); connect(specialAlignmentED, SIGNAL(textEdited(const QString &)), this, SLOT(checkEnabled())); - connect(columnTypeCO, SIGNAL(activated(int)), - this, SLOT(checkEnabled())); connect(columnWidthED, SIGNAL(textEdited(const QString &)), this, SLOT(checkEnabled())); connect(columnWidthUnitLC, SIGNAL(selectionChanged(lyx::Length::UNIT)), @@ -203,6 +201,14 @@ void GuiTabular::on_interlinespaceCO_activated(int index) } +void GuiTabular::on_columnTypeCO_activated(int index) +{ + checkEnabled(); + if (index == 2) + columnWidthED->setFocus(); +} + + void GuiTabular::enableWidgets() const { // if there is a LaTeX argument, the width and alignment will be overwritten diff --git a/src/frontends/qt4/GuiTabular.h b/src/frontends/qt4/GuiTabular.h index 20f7681780..908b4db815 100644 --- a/src/frontends/qt4/GuiTabular.h +++ b/src/frontends/qt4/GuiTabular.h @@ -36,6 +36,7 @@ private Q_SLOTS: void on_topspaceCO_activated(int index); void on_bottomspaceCO_activated(int index); void on_interlinespaceCO_activated(int index); + void on_columnTypeCO_activated(int index); private: /// \name InsetParamsWidget inherited methods -- 2.39.2