From 70675ca0985b79b82169f276a711a8e762643c96 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Sat, 16 Sep 2017 10:12:38 +0000 Subject: [PATCH] Do not allow window manager events to close the astronomical data window git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8086 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- astro.cpp | 3 ++- mainwindow.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/astro.cpp b/astro.cpp index 7b995c900..bd378f78c 100644 --- a/astro.cpp +++ b/astro.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include "commons.h" @@ -56,7 +57,7 @@ Astro::~Astro () void Astro::closeEvent (QCloseEvent * e) { write_settings (); - QWidget::closeEvent (e); + e->ignore (); // do not allow closure by the window system } void Astro::read_settings () diff --git a/mainwindow.cpp b/mainwindow.cpp index e28331ac4..c9910f18e 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -2051,6 +2051,7 @@ void MainWindow::closeEvent(QCloseEvent * e) m_valid = false; // suppresses subprocess errors m_config.transceiver_offline (); writeSettings (); + m_astroWidget.reset (); m_guiTimer.stop (); m_prefixes.reset (); m_shortcuts.reset ();