Commit e0c49286 authored by Thiago Santini's avatar Thiago Santini

Fixes widget reaction on minimize

parent 459bc499
...@@ -18,6 +18,7 @@ signals: ...@@ -18,6 +18,7 @@ signals:
public slots: public slots:
protected: protected:
void hideEvent(QHideEvent *event) Q_DECL_OVERRIDE { Q_UNUSED(event) emit closed(false); }
void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE { Q_UNUSED(event) emit closed(false); } void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE { Q_UNUSED(event) emit closed(false); }
void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE { emit keyPress(event); } void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE { emit keyPress(event); }
void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE { emit keyRelease(event); } void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE { emit keyRelease(event); }
......
...@@ -428,11 +428,13 @@ void MainWindow::widgetButtonReact(QMainWindow *window, bool checked) ...@@ -428,11 +428,13 @@ void MainWindow::widgetButtonReact(QMainWindow *window, bool checked)
if (!window) if (!window)
return; return;
if (checked) { if (checked) {
window->show(); window->show();
window->raise(); window->raise();
window->activateWindow(); window->activateWindow();
window->setFocus(); window->setFocus();
if (window->isMinimized())
window->showNormal();
} else } else
window->hide(); window->hide();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment