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 <QHideEvent>
|
||||
#include <QStyle>
|
||||
|
||||
#include "ui_errordialog.h"
|
||||
|
@ -47,9 +48,11 @@ void ErrorDialog::ShowMessage(const QString& message) {
|
|||
activateWindow();
|
||||
}
|
||||
|
||||
void ErrorDialog::hideEvent(QHideEvent*) {
|
||||
current_messages_.clear();
|
||||
UpdateContent();
|
||||
void ErrorDialog::hideEvent(QHideEvent* event) {
|
||||
if (!event->spontaneous()) {
|
||||
current_messages_.clear();
|
||||
UpdateContent();
|
||||
}
|
||||
}
|
||||
|
||||
void ErrorDialog::UpdateContent() {
|
||||
|
|
Loading…
Reference in New Issue