Commit 76ee5524 authored by Christoffer Ackelman's avatar Christoffer Ackelman Committed by Esteban Blanc

QT: Workaround to counter old Proview code closing the XttGe window on right click.

parent ec847821
...@@ -268,6 +268,9 @@ bool QtScrollWidgetGlow::event(QEvent* event) ...@@ -268,6 +268,9 @@ bool QtScrollWidgetGlow::event(QEvent* event)
is_realized = true; is_realized = true;
} }
handleEvent(event); handleEvent(event);
if (event->type() >= QEvent::MouseButtonPress && event->type() <= QEvent::MouseMove) {
return true;
}
return QWidget::event(event); return QWidget::event(event);
} }
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include "xtt_log.h" #include "xtt_log.h"
#include "xtt_xnav.h" #include "xtt_xnav.h"
#include <QCloseEvent>
#include <QMenuBar> #include <QMenuBar>
#include <QShortcut> #include <QShortcut>
#include <QVBoxLayout> #include <QVBoxLayout>
...@@ -208,6 +209,9 @@ XttGeQt::~XttGeQt() ...@@ -208,6 +209,9 @@ XttGeQt::~XttGeQt()
nav_widget->close(); nav_widget->close();
} }
delete graph; delete graph;
if (!(options & ge_mOptions_Embedded)) {
delete toplevel;
}
} }
void XttGeQt::pop() void XttGeQt::pop()
...@@ -227,7 +231,7 @@ void XttGeQtWidget::closeEvent(QCloseEvent* event) ...@@ -227,7 +231,7 @@ void XttGeQtWidget::closeEvent(QCloseEvent* event)
} else if (!(ge->options & ge_mOptions_Embedded)) { } else if (!(ge->options & ge_mOptions_Embedded)) {
delete ge; delete ge;
} }
QWidget::closeEvent(event); event->ignore();
} }
XttGeQt::XttGeQt(void* xg_parent_ctx, const char* xg_name, XttGeQt::XttGeQt(void* xg_parent_ctx, const char* xg_name,
......
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