Commit f515be23 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Fixed Wizard window title becoming corrupt for a few milliseconds when the dialogue is closed.

parent 85a162f6
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include "wb_wge_qt.h" #include "wb_wge_qt.h"
#include <QApplication> #include <QApplication>
#include <QCloseEvent>
#include <QMenuBar> #include <QMenuBar>
#include <QMessageBox> #include <QMessageBox>
#include <QShortcut> #include <QShortcut>
...@@ -146,9 +147,14 @@ void WGeQtWidget::action_resize(QResizeEvent* event) ...@@ -146,9 +147,14 @@ void WGeQtWidget::action_resize(QResizeEvent* event)
WGeQt::~WGeQt() WGeQt::~WGeQt()
{ {
if (close_cb) {
(close_cb)(this);
}
if (nav_widget) { if (nav_widget) {
nav_widget->close(); nav_widget->close();
} }
delete graph;
delete toplevel;
} }
void WGeQt::set_size(int width, int height) void WGeQt::set_size(int width, int height)
...@@ -175,7 +181,7 @@ void WGeQtWidget::closeEvent(QCloseEvent* event) ...@@ -175,7 +181,7 @@ void WGeQtWidget::closeEvent(QCloseEvent* event)
} else { } else {
delete ge; delete ge;
} }
QWidget::closeEvent(event); event->ignore();
} }
WGeQt::WGeQt(void* wge_parent_ctx, char* wge_name, char* wge_filename, WGeQt::WGeQt(void* wge_parent_ctx, char* wge_name, char* wge_filename,
...@@ -199,7 +205,6 @@ WGeQt::WGeQt(void* wge_parent_ctx, char* wge_name, char* wge_filename, ...@@ -199,7 +205,6 @@ WGeQt::WGeQt(void* wge_parent_ctx, char* wge_name, char* wge_filename,
// Qt // Qt
toplevel = new WGeQtWidget(this); toplevel = new WGeQtWidget(this);
toplevel->setWindowTitle(fl(title)); toplevel->setWindowTitle(fl(title));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
CoWowQt::SetWindowIcon(toplevel); CoWowQt::SetWindowIcon(toplevel);
......
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