Commit febc1951 authored by Christoffer Ackelman's avatar Christoffer Ackelman

Added workaround for XttGe closing the window on right click.

parent 59137ac7
...@@ -262,6 +262,9 @@ bool QtScrollWidgetGlow::event(QEvent* event) ...@@ -262,6 +262,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);
} }
......
...@@ -209,6 +209,9 @@ XttGeQt::~XttGeQt() ...@@ -209,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()
...@@ -228,7 +231,7 @@ void XttGeQtWidget::closeEvent(QCloseEvent* event) ...@@ -228,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();
} }
void XttGeQtWidget::resizeEvent(QResizeEvent* event) void XttGeQtWidget::resizeEvent(QResizeEvent* event)
......
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