errordialog: Don't clear messages on sponaneous events.
Don't clear the message dialog if a hide event is sent from the window manager. These spontaneous events are sent when a window is minimized, moved to a different screen, etc.
This commit is contained in:
parent
b989a674a4
commit
4e8a12f373
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
#include "errordialog.h"
|
#include "errordialog.h"
|
||||||
|
|
||||||
|
#include <QHideEvent>
|
||||||
#include <QStyle>
|
#include <QStyle>
|
||||||
|
|
||||||
#include "ui_errordialog.h"
|
#include "ui_errordialog.h"
|
||||||
|
@ -47,9 +48,11 @@ void ErrorDialog::ShowMessage(const QString& message) {
|
||||||
activateWindow();
|
activateWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ErrorDialog::hideEvent(QHideEvent*) {
|
void ErrorDialog::hideEvent(QHideEvent* event) {
|
||||||
current_messages_.clear();
|
if (!event->spontaneous()) {
|
||||||
UpdateContent();
|
current_messages_.clear();
|
||||||
|
UpdateContent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ErrorDialog::UpdateContent() {
|
void ErrorDialog::UpdateContent() {
|
||||||
|
|
Loading…
Reference in New Issue