diff --git a/src/lay/lay/layMacroEditorDialog.cc b/src/lay/lay/layMacroEditorDialog.cc index ed07e8e17..25a90944a 100644 --- a/src/lay/lay/layMacroEditorDialog.cc +++ b/src/lay/lay/layMacroEditorDialog.cc @@ -1507,29 +1507,39 @@ MacroEditorDialog::eventFilter (QObject *obj, QEvent *event) return false; } - if (lay::BusySection::is_busy () && (m_in_breakpoint || m_in_exec) && (dynamic_cast (event) != 0 || dynamic_cast (event) != 0)) { + if (m_in_exec) { + + if (lay::BusySection::is_busy ()) { + +#if 0 + if (dynamic_cast (event) != 0 || dynamic_cast (event) != 0) { + + // In breakpoint or execution mode and while processing the events inside the debugger, + // ignore all input or paint events targeted to widgets which are not children of this or the assistant dialog. + // Ignoring the paint event is required because otherwise a repaint action would be triggered on a layout which + // is potentially unstable or inconsistent. + // We nevertheless allow events send to a HelpDialog or ProgressWidget since those are vital for the application's + // functionality and are known not to cause any interference. + QObject *rec = obj; + while (rec && (rec != this && !dynamic_cast (rec) && !dynamic_cast (rec))) { + rec = rec->parent (); + } + if (! rec) { + // TODO: reschedule the paint events (?) + return true; + } + + } +#endif + + } else { + + // While no explicit event processing is in progress and we are executing, this is an indication that + // "real" events are processed. In that case, we can postpone excplit processing. This avoids interference + // with GUI code run in the debugger. + m_last_process_events = tl::Clock::current (); - // In breakpoint or execution mode and while processing the events from the debugger, - // ignore all input or paint events targeted to widgets which are not children of this or the assistant dialog. - // Ignoring the paint event is required because otherwise a repaint action would be triggered on a layout which - // is potentially unstable or inconsistent. - // We nevertheless allow events send to a HelpDialog or ProgressWidget since those are vital for the application's - // functionality and are known not to cause any interference. - QObject *rec = obj; - while (rec && (rec != this && !dynamic_cast (rec) && !dynamic_cast (rec))) { - rec = rec->parent (); } - if (! rec) { - // TODO: reschedule the paint events (?) - return true; - } - - } else if (! lay::BusySection::is_busy () && m_in_exec) { - - // While no explicit event processing is in progress and we are executing, this is an indication that - // "real" events are processed. In that case, we can postpone excplit processing. This avoids interference - // with GUI code run in the debugger. - m_last_process_events = tl::Clock::current (); } @@ -3054,6 +3064,8 @@ MacroEditorDialog::start_exec (gsi::Interpreter *ec) return; } else if (m_ignore_exec_events) { return; + } else if (lay::BusySection::is_busy () || m_in_breakpoint) { + return; } // prevents recursion @@ -3215,7 +3227,7 @@ MacroEditorDialog::exception_thrown (gsi::Interpreter *interpreter, size_t file_ exit_if_needed (); // avoid recursive breakpoints and exception catches from the console while in a breakpoint or exception stop - if (lay::BusySection::is_busy ()) { + if (lay::BusySection::is_busy () || m_in_breakpoint) { return; } @@ -3317,7 +3329,7 @@ MacroEditorDialog::trace (gsi::Interpreter *interpreter, size_t file_id, int lin exit_if_needed (); // avoid recursive breakpoints and exception catches from the console while in a breakpoint or exception stop - if (lay::BusySection::is_busy ()) { + if (lay::BusySection::is_busy () || m_in_breakpoint) { return; }