#12626 disable Ok button of shortcut editor when LFUN is empty

This commit is contained in:
Stephan Witt 2023-08-06 00:28:50 +02:00
parent 49fe82ec8d
commit d656e01172
2 changed files with 13 additions and 0 deletions

View File

@ -2793,6 +2793,14 @@ GuiShortcutDialog::GuiShortcutDialog(QWidget * parent) : QDialog(parent)
Ui::shortcutUi::setupUi(this);
QDialog::setModal(true);
lfunLE->setValidator(new NoNewLineValidator(lfunLE));
on_lfunLE_textChanged();
}
void GuiShortcutDialog::on_lfunLE_textChanged()
{
QPushButton * ok = buttonBox->button(QDialogButtonBox::Ok);
ok->setEnabled(!lfunLE->text().isEmpty());
}

View File

@ -459,8 +459,13 @@ public Q_SLOTS:
class GuiShortcutDialog : public QDialog, public Ui::shortcutUi
{
Q_OBJECT
public:
GuiShortcutDialog(QWidget * parent);
public Q_SLOTS:
void on_lfunLE_textChanged();
};