Gui: automatically activate the DlgExpressionInput dialog; fixes #4384

This commit is contained in:
Christopher Coley
2020-09-04 18:39:09 +02:00
committed by wwmayer
parent 685fc401a8
commit 4cfefb1938
2 changed files with 10 additions and 1 deletions
+7 -1
View File
@@ -107,7 +107,6 @@ DlgExpressionInput::DlgExpressionInput(const App::ObjectIdentifier & _path,
this->resize(ui->expression->width()+18,this->height());
}
ui->expression->setFocus();
ui->expression->activateWindow();
}
DlgExpressionInput::~DlgExpressionInput()
@@ -268,6 +267,13 @@ void DlgExpressionInput::mousePressEvent(QMouseEvent* ev)
}
}
void DlgExpressionInput::show()
{
QDialog::show();
this->activateWindow();
ui->expression->selectAll();
}
void DlgExpressionInput::showEvent(QShowEvent* ev)
{
QDialog::showEvent(ev);
+3
View File
@@ -63,6 +63,9 @@ public:
bool eventFilter(QObject *obj, QEvent *event);
public Q_SLOTS:
void show();
protected:
void showEvent(QShowEvent*);
void mouseReleaseEvent(QMouseEvent*);