diff --git a/src/layview/layview/layLayoutView_qt.cc b/src/layview/layview/layLayoutView_qt.cc index 3df2eda00..b0cd035bc 100644 --- a/src/layview/layview/layLayoutView_qt.cc +++ b/src/layview/layview/layLayoutView_qt.cc @@ -638,6 +638,8 @@ void LayoutView::do_setup_editor_options_pages () (*op)->setup (this); } } + + activate_editor_option_pages (); } void LayoutView::side_panel_destroyed (QObject *sender) @@ -1437,23 +1439,26 @@ void LayoutView::mode (int m) { if (mode () != m) { - LayoutViewBase::mode (m); + activate_editor_option_pages (); + } +} - lay::EditorOptionsPages *eo_pages = editor_options_pages (); - if (eo_pages) { +void +LayoutView::activate_editor_option_pages () +{ + lay::EditorOptionsPages *eo_pages = editor_options_pages (); + if (eo_pages) { - // TODO: this is very inefficient as each "activate" will regenerate the tabs - for (std::vector::const_iterator op = eo_pages->pages ().begin (); op != eo_pages->pages ().end (); ++op) { - bool is_active = false; - if ((*op)->plugin_declaration () == 0) { - is_active = true; - } else if (active_plugin () && active_plugin ()->plugin_declaration () == (*op)->plugin_declaration ()) { - is_active = true; - } - (*op)->activate (is_active); + // TODO: this is very inefficient as each "activate" will regenerate the tabs + for (std::vector::const_iterator op = eo_pages->pages ().begin (); op != eo_pages->pages ().end (); ++op) { + bool is_active = false; + if ((*op)->plugin_declaration () == 0) { + is_active = true; + } else if (active_plugin () && active_plugin ()->plugin_declaration () == (*op)->plugin_declaration ()) { + is_active = true; } - + (*op)->activate (is_active); } } diff --git a/src/layview/layview/layLayoutView_qt.h b/src/layview/layview/layLayoutView_qt.h index 773c502b3..b32ec4f12 100644 --- a/src/layview/layview/layLayoutView_qt.h +++ b/src/layview/layview/layLayoutView_qt.h @@ -679,6 +679,8 @@ protected: private: using LayoutViewBase::ui; + + void activate_editor_option_pages (); }; /**