Commit 90493bf3 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Fixed closing GE subgraphs.

parent 24c20f39
...@@ -1261,8 +1261,8 @@ void GeQtWidget::focusInEvent(QFocusEvent* event) ...@@ -1261,8 +1261,8 @@ void GeQtWidget::focusInEvent(QFocusEvent* event)
GeQt::~GeQt() GeQt::~GeQt()
{ {
if (subgraphs_widget) { if (subgraphs) {
subgraphs_widget->close(); delete subgraphs;
} }
delete subpalette; delete subpalette;
delete recall_entry; delete recall_entry;
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include "ge_attr_qt.h" #include "ge_attr_qt.h"
#include "ge_subgraphs_qt.h" #include "ge_subgraphs_qt.h"
#include <QCloseEvent>
#include <QMenuBar> #include <QMenuBar>
#include <QTimer> #include <QTimer>
#include <QVBoxLayout> #include <QVBoxLayout>
...@@ -57,7 +58,7 @@ void SubGraphsQtWidget::closeEvent(QCloseEvent* event) ...@@ -57,7 +58,7 @@ void SubGraphsQtWidget::closeEvent(QCloseEvent* event)
trace_timerid->stop(); trace_timerid->stop();
delete subgraphs; delete subgraphs;
} }
QWidget::closeEvent(event); event->ignore();
} }
void SubGraphsQtWidget::focusInEvent(QFocusEvent* event) void SubGraphsQtWidget::focusInEvent(QFocusEvent* event)
...@@ -119,7 +120,6 @@ SubGraphsQt::SubGraphsQt(void* xn_parent_ctx, const char* xn_name, ...@@ -119,7 +120,6 @@ SubGraphsQt::SubGraphsQt(void* xn_parent_ctx, const char* xn_name,
toplevel = new SubGraphsQtWidget(this); toplevel = new SubGraphsQtWidget(this);
toplevel->setMinimumSize(300, 500); toplevel->setMinimumSize(300, 500);
toplevel->setWindowTitle(fl(name)); toplevel->setWindowTitle(fl(name));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
// Menu // Menu
QMenuBar* menu_bar = new QMenuBar(toplevel); QMenuBar* menu_bar = new QMenuBar(toplevel);
...@@ -171,6 +171,8 @@ SubGraphsQt::~SubGraphsQt() ...@@ -171,6 +171,8 @@ SubGraphsQt::~SubGraphsQt()
} }
delete brow; delete brow;
delete toplevel;
} }
void SubGraphsQt::trace_start() void SubGraphsQt::trace_start()
......
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