Merge pull request #1372 from KLayout/issue-1219

Solved issue #1219: 'close' button works now in macro IDE, printing n…
This commit is contained in:
Matthias Köfferlein 2023-05-14 00:02:09 +02:00 committed by GitHub
commit ae07629599
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -399,6 +399,7 @@ MacroEditorDialog::MacroEditorDialog (lay::Dispatcher *pr, lym::MacroCollection
replaceText->setPlaceholderText (tr ("Replace text ..."));
#endif
connect (closeButton, SIGNAL (clicked ()), this, SLOT (close_button_clicked ()));
connect (forwardButton, SIGNAL (clicked ()), this, SLOT (forward ()));
connect (backwardButton, SIGNAL (clicked ()), this, SLOT (backward ()));
@ -2362,7 +2363,7 @@ END_PROTECTED
void
MacroEditorDialog::tab_close_requested (int index)
{
if (m_in_exec) {
if (m_in_exec || index < 0) {
return;
}
@ -3736,8 +3737,12 @@ MacroEditorDialog::run (int stop_stack_depth, lym::Macro *macro)
set_run_macro (macro);
try {
write_str (tl::sprintf (tl::to_string (tr ("Running macro %s\n")), macro->path ()).c_str (), OS_echo);
macro->run ();
m_stop_stack_depth = -1;
} catch (tl::ExitException &) {
m_stop_stack_depth = -1;
// .. ignore exit exceptions ..