diff --git a/src/edt/edt/edtPartialService.cc b/src/edt/edt/edtPartialService.cc index f66da5b94..96dc5c437 100644 --- a/src/edt/edt/edtPartialService.cc +++ b/src/edt/edt/edtPartialService.cc @@ -32,6 +32,7 @@ #include "edtService.h" #include "edtConfig.h" #include "edtDialogs.h" +#include "edtPlugin.h" #include "edtEditorOptionsPages.h" #include @@ -1061,15 +1062,25 @@ PartialService::move_ac () const void PartialService::deactivated () { + // make all editor option pages visible + activate_service (view (), plugin_declaration (), false); + // clear selection when this mode is left partial_select (db::DBox (), lay::Editable::Reset); clear_partial_transient_selection (); + remove_editor_options_page (view ()); } void PartialService::activated () { - // ... + if (view ()->is_editable ()) { + // Show editor options panel + show_editor_options_page (view ()); + } + + // make all editor option pages visible + activate_service (view (), plugin_declaration (), true); } void diff --git a/src/edt/edt/edtPlugin.cc b/src/edt/edt/edtPlugin.cc index 68747b3d4..18f70c3a5 100644 --- a/src/edt/edt/edtPlugin.cc +++ b/src/edt/edt/edtPlugin.cc @@ -502,7 +502,7 @@ commit_recent (lay::LayoutView *view) } class PartialPluginDeclaration - : public lay::PluginDeclaration + : public PluginDeclarationBase { public: PartialPluginDeclaration (const std::string &title, const std::string &mouse_mode) @@ -516,6 +516,11 @@ public: // .. nothing yet .. } + virtual void get_editor_options_pages (std::vector & /*pages*/, lay::LayoutView * /*view*/, lay::Dispatcher * /*root*/) const + { + // .. no specific ones .. + } + virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutView *view) const { return new edt::PartialService (manager, view, root);