diff --git a/src/lay/lay/layMainWindow.cc b/src/lay/lay/layMainWindow.cc
index f8650b5cb..2f1ba3221 100644
--- a/src/lay/lay/layMainWindow.cc
+++ b/src/lay/lay/layMainWindow.cc
@@ -1100,6 +1100,18 @@ MainWindow::dock_widget_visibility_changed (bool /*visible*/)
void
MainWindow::file_changed_timer ()
{
+ // Don't evaluate file changed notifications while an operation is busy -
+ // otherwise we'd interfere with such operations.
+ if (mp_pr->is_busy ()) {
+
+ // Restart the timer to get notified again
+ m_file_changed_timer.setInterval (200);
+ m_file_changed_timer.start ();
+
+ return;
+
+ }
+
// Prevent recursive signals
m_file_changed_timer.blockSignals (true);
@@ -1260,23 +1272,24 @@ MainWindow::about_to_exec ()
config_get (cfg_full_hier_new_cell, f);
if (!f) {
TipDialog td (this,
- tl::to_string (QObject::tr ("With the current settings, only the top cell's boundary is shown initially.\n"
- "\n"
- "This can be confusing, since the layout itself becomes visible only after selecting "
- "all hierarchy levels manually.\n"
- "\n"
- "This setting can be changed now. It can also be changed any time later using \"File/Setup\", \"Navigation/New Cell\": "
- "\"Select all hierarchy levels\".\n"
- "\n"
- "Press 'Yes' to switch to 'show full hierarchy by default' mode.\n"
- "With 'No', the behaviour will remain 'cell boundary only'.")),
+ tl::to_string (QObject::tr ("
"
+ "With the current settings, only the top cell's content is shown initially, but the child cells are not drawn.
"
+ "This can be confusing, since the full layout becomes visible only after selecting "
+ "all hierarchy levels manually.
"
+ "This setting can be changed now. It can also be changed any time later using \"File/Setup\", \"Navigation/New Cell\": "
+ "\"Select all hierarchy levels\".
"
+ ""
+ "- Press Yes to enable Show full hierarchy mode now.
\n"
+ "- With No, the mode will remain Show top level only.
"
+ "
"
+ "")),
"only-top-level-shown-by-default",
- lay::TipDialog::yesnocancel_buttons);
+ lay::TipDialog::yesno_buttons);
lay::TipDialog::button_type button = lay::TipDialog::null_button;
- td.exec_dialog (button);
- if (button == lay::TipDialog::yes_button) {
- config_set (cfg_full_hier_new_cell, true);
- } else if (button == lay::TipDialog::cancel_button) {
+ if (td.exec_dialog (button)) {
+ if (button == lay::TipDialog::yes_button) {
+ config_set (cfg_full_hier_new_cell, true);
+ }
// Don't bother the user with more dialogs.
return;
}
diff --git a/src/lay/lay/layProgress.cc b/src/lay/lay/layProgress.cc
index 44dd0b581..9713bbee7 100644
--- a/src/lay/lay/layProgress.cc
+++ b/src/lay/lay/layProgress.cc
@@ -86,6 +86,12 @@ ProgressReporter::set_progress_bar (lay::ProgressBar *pb)
void
ProgressReporter::register_object (tl::Progress *progress)
{
+ if (mp_objects.empty ()) {
+ // to avoid recursions of any kind, disallow any user interaction except
+ // cancelling the operation
+ QApplication::instance ()->installEventFilter (this);
+ }
+
mp_objects.push_back (progress); // this keeps the outmost one visible. push_front would make the latest one visible.
// mp_objects.push_front (progress);
@@ -119,11 +125,15 @@ ProgressReporter::unregister_object (tl::Progress *progress)
}
update_and_yield ();
- return;
+ break;
}
}
+
+ if (mp_objects.empty ()) {
+ QApplication::instance ()->removeEventFilter (this);
+ }
}
void
@@ -207,16 +217,6 @@ ProgressReporter::set_visible (bool vis)
m_pw_visible = vis;
}
-
- if (QApplication::instance()) {
- if (vis) {
- // to avoid recursions of any kind, disallow any user interaction except
- // cancelling the operation
- QApplication::instance ()->installEventFilter (this);
- } else {
- QApplication::instance ()->removeEventFilter (this);
- }
- }
}
bool
diff --git a/src/lay/lay/layProgress.h b/src/lay/lay/layProgress.h
index 482a1c838..f62a7bddb 100644
--- a/src/lay/lay/layProgress.h
+++ b/src/lay/lay/layProgress.h
@@ -73,6 +73,11 @@ public:
void signal_break ();
void set_progress_bar (lay::ProgressBar *pb);
+ bool is_busy () const
+ {
+ return !mp_objects.empty ();
+ }
+
private:
std::list mp_objects;
tl::Clock m_start_time;
diff --git a/src/laybasic/laybasic/TipDialog.ui b/src/laybasic/laybasic/TipDialog.ui
index df9944d84..8edc3f517 100644
--- a/src/laybasic/laybasic/TipDialog.ui
+++ b/src/laybasic/laybasic/TipDialog.ui
@@ -1,58 +1,77 @@
-
+
+
TipDialog
-
-
+
+
0
0
549
- 291
+ 334
-
+
Tip
-
-
+
+
9
-
+
+ 9
+
+
+ 9
+
+
+ 9
+
+
6
- -
-
-
+
-
+
+
QFrame::NoFrame
-
+
QFrame::Raised
-
-
- 9
-
-
+
+
6
+
+ 9
+
+
+ 9
+
+
+ 9
+
+
+ 9
+
-
-
-
+
+
TextLabel
-
+
true
-
-
+
Qt::Vertical
-
+
QSizePolicy::Expanding
-
+
391
91
@@ -63,30 +82,39 @@
- -
-
-
+
-
+
+
QFrame::NoFrame
-
+
QFrame::Raised
-
-
+
+
+ 6
+
+
0
-
- 6
+
+ 0
+
+
+ 0
+
+
+ 0
-
-
+
Qt::Horizontal
-
+
QSizePolicy::Expanding
-
+
381
31
@@ -95,42 +123,42 @@
-
-
-
+
+
Yes
-
+
true
-
-
-
+
+
No
-
-
-
+
+
Ok
-
+
true
-
-
-
+
+
Cancel
-
-
-
+
+
Close
@@ -138,45 +166,52 @@
- -
-
-
-
- 0
- 5
+
-
+
+
+
0
0
-
+
QFrame::NoFrame
-
+
QFrame::Raised
-
-
- 9
-
-
+
+
6
+
+ 9
+
+
+ 9
+
+
+ 9
+
+
+ 9
+
-
-
-
+
+
-
- :/bulb.png
+
+ :/bulb.png
-
-
+
Qt::Vertical
-
+
20
40
@@ -187,15 +222,15 @@
- -
+
-
-
+
Qt::Vertical
-
+
QSizePolicy::Fixed
-
+
531
20
@@ -203,15 +238,15 @@
- -
+
-
-
+
Qt::Vertical
-
+
QSizePolicy::Fixed
-
+
481
24
@@ -219,30 +254,39 @@
- -
-
-
+
-
+
+
QFrame::NoFrame
-
+
QFrame::Raised
-
-
+
+
+ 6
+
+
0
-
- 6
+
+ 0
+
+
+ 0
+
+
+ 0
-
-
+
Qt::Horizontal
-
+
QSizePolicy::Fixed
-
+
15
20
@@ -251,17 +295,15 @@
-
-
-
-
- 5
- 0
+
+
+
0
0
-
- Don't show this window again (use "Help/Show All Tips" to show it again)
+
+ Don't show this window again (use "Help/Show All Tips" to show it again)
@@ -271,7 +313,7 @@
-
+
@@ -280,11 +322,11 @@
TipDialog
accept()
-
+
489
278
-
+
267
149