1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2025-01-30 09:05:04 +01:00

ErrorDialog: Only raise window if parent is maximized

Fixes #1627
This commit is contained in:
Jonas Kvinge 2025-01-22 17:50:41 +01:00
parent 5db01482eb
commit 02bb875bb3
2 changed files with 7 additions and 2 deletions

View File

@ -39,6 +39,7 @@ using namespace Qt::Literals::StringLiterals;
ErrorDialog::ErrorDialog(QWidget *parent)
: QDialog(parent),
parent_(parent),
ui_(new Ui_ErrorDialog) {
ui_->setupUi(this);
@ -66,8 +67,11 @@ void ErrorDialog::ShowMessage(const QString &message) {
UpdateContent();
show();
raise();
activateWindow();
if (parent_ && parent_->isMaximized()) {
raise();
activateWindow();
}
}

View File

@ -48,6 +48,7 @@ class ErrorDialog : public QDialog {
private:
void UpdateContent();
QWidget *parent_;
Ui_ErrorDialog *ui_;
QStringList current_messages_;