WIP: partial editing now opens general options

This commit is contained in:
Matthias Koefferlein 2020-08-27 20:32:37 +02:00
parent 994731c1f0
commit 25588c10c8
2 changed files with 18 additions and 2 deletions

View File

@ -32,6 +32,7 @@
#include "edtService.h"
#include "edtConfig.h"
#include "edtDialogs.h"
#include "edtPlugin.h"
#include "edtEditorOptionsPages.h"
#include <cmath>
@ -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

View File

@ -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<edt::EditorOptionsPage *> & /*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);