mirror of https://github.com/KLayout/klayout.git
WIP: further refactoring.
This commit is contained in:
parent
a44535e009
commit
e8a875ccb5
|
|
@ -1412,6 +1412,14 @@ GuiApplication::exec ()
|
|||
void
|
||||
GuiApplication::shutdown ()
|
||||
{
|
||||
// avoid deferred execution later on where there isn't a valid main window anymore
|
||||
// (problem case: showing a dialog inside main windows's destroyed signal - this will
|
||||
// process events and trigger execution if not disabled)
|
||||
if (! tl::DeferredMethodScheduler::instance ()->is_disabled ()) {
|
||||
tl::DeferredMethodScheduler::instance ()->execute ();
|
||||
}
|
||||
tl::DeferredMethodScheduler::instance ()->enable (false);
|
||||
|
||||
if (mp_mw) {
|
||||
delete mp_mw;
|
||||
mp_mw = 0;
|
||||
|
|
|
|||
|
|
@ -692,14 +692,6 @@ MainWindow::MainWindow (QApplication *app, lay::Plugin *plugin_parent, const cha
|
|||
|
||||
MainWindow::~MainWindow ()
|
||||
{
|
||||
// avoid deferred execution later on where there isn't a valid main window anymore
|
||||
// (problem case: showing a dialog inside main windows's destroyed signal - this will
|
||||
// process events and trigger execution if not disabled)
|
||||
if (! tl::DeferredMethodScheduler::instance ()->is_disabled ()) {
|
||||
tl::DeferredMethodScheduler::instance ()->execute ();
|
||||
}
|
||||
tl::DeferredMethodScheduler::instance ()->enable (false);
|
||||
|
||||
lay::register_help_handler (0, 0, 0);
|
||||
|
||||
// since the configuration actions unregister themselves, we need to do this before the main
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ Dispatcher::Dispatcher (Plugin *parent, bool standalone)
|
|||
: Plugin (parent, standalone),
|
||||
m_menu (this)
|
||||
{
|
||||
if (! parent) {
|
||||
if (! parent && ! ms_dispatcher_instance) {
|
||||
ms_dispatcher_instance = this;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue