diff --git a/src/laybasic/laybasic/layLayoutViewBase.cc b/src/laybasic/laybasic/layLayoutViewBase.cc index b0c537a40..13e60813d 100644 --- a/src/laybasic/laybasic/layLayoutViewBase.cc +++ b/src/laybasic/laybasic/layLayoutViewBase.cc @@ -3282,13 +3282,13 @@ LayoutViewBase::reload_layout (unsigned int cv_index) handle = new lay::LayoutHandle (new db::Layout (is_editable (), manager ()), filename); cv.set (handle); - try { + BEGIN_PROTECTED_CLEANUP // re-create the layers required for (std::map ::const_iterator ol = org_layers.begin (); ol != org_layers.end (); ++ol) { cv->layout ().insert_layer (ol->first, ol->second); } - + { tl::log << tl::to_string (tr ("Loading file: ")) << filename; tl::SelfTimer timer (tl::verbosity () >= 11, tl::to_string (tr ("Loading"))); @@ -3320,9 +3320,10 @@ LayoutViewBase::reload_layout (unsigned int cv_index) cv->rename (name, true); set_layout (cv, cv_index); - } catch (...) { + END_PROTECTED_CLEANUP + { update_content (); - throw; + return; } // recreate the hidden cell indices from the names diff --git a/src/layview/layview/layLayoutView_qt.cc b/src/layview/layview/layLayoutView_qt.cc index 8e55726a4..3f70e93e8 100644 --- a/src/layview/layview/layLayoutView_qt.cc +++ b/src/layview/layview/layLayoutView_qt.cc @@ -245,6 +245,8 @@ LayoutViewWidget::remove_notification (const LayoutViewNotification ¬ificatio void LayoutViewWidget::notification_action (const LayoutViewNotification ¬ification, const std::string &action) { + BEGIN_PROTECTED + if (action == "reload") { std::string fn = notification.parameter ().to_string (); @@ -259,6 +261,8 @@ LayoutViewWidget::notification_action (const LayoutViewNotification ¬ificatio remove_notification (notification); } + + END_PROTECTED } void