mirror of https://github.com/KLayout/klayout.git
Bugfix: properly integrating newborn plugins
This commit is contained in:
parent
340c1ef6e9
commit
7f7a5bd3ac
|
|
@ -769,14 +769,6 @@ LayoutViewBase::configure (const std::string &name, const std::string &value)
|
|||
{
|
||||
lay::Dispatcher::configure (name, value);
|
||||
|
||||
if (mp_move_service && mp_move_service->configure (name, value)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mp_tracker && mp_tracker->configure (name, value)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (name == cfg_default_lyp_file) {
|
||||
|
||||
m_def_lyp_file = value;
|
||||
|
|
@ -1425,14 +1417,6 @@ LayoutViewBase::config_finalize ()
|
|||
void
|
||||
LayoutViewBase::enable_edits (bool enable)
|
||||
{
|
||||
// enable or disable these services:
|
||||
if (mp_selection_service) {
|
||||
mp_selection_service->enable (enable);
|
||||
}
|
||||
if (mp_move_service) {
|
||||
mp_move_service->enable (enable);
|
||||
}
|
||||
|
||||
// enable or disable the services that implement "lay::ViewService"
|
||||
for (std::vector<lay::Plugin *>::iterator p = mp_plugins.begin (); p != mp_plugins.end (); ++p) {
|
||||
lay::ViewService *svc = (*p)->view_service_interface ();
|
||||
|
|
@ -4843,13 +4827,6 @@ LayoutViewBase::background_color (tl::Color c)
|
|||
|
||||
do_set_background_color (c, contrast);
|
||||
|
||||
if (mp_selection_service) {
|
||||
mp_selection_service->set_colors (c, contrast);
|
||||
}
|
||||
if (mp_zoom_service) {
|
||||
mp_zoom_service->set_colors (c, contrast);
|
||||
}
|
||||
|
||||
// Set the color for all ViewService interfaces
|
||||
for (std::vector<lay::Plugin *>::iterator p = mp_plugins.begin (); p != mp_plugins.end (); ++p) {
|
||||
lay::ViewService *svc = (*p)->view_service_interface ();
|
||||
|
|
|
|||
|
|
@ -46,6 +46,11 @@ public:
|
|||
bool leave_event (bool prio);
|
||||
bool configure (const std::string &name, const std::string &value);
|
||||
|
||||
lay::ViewService *view_service_interface ()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
private:
|
||||
lay::LayoutViewBase *mp_view;
|
||||
tl::shared_collection<lay::DMarker> mp_markers;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,11 @@ public:
|
|||
void finish ();
|
||||
void cancel ();
|
||||
|
||||
lay::ViewService *view_service_interface ()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
private:
|
||||
virtual bool mouse_press_event (const db::DPoint &p, unsigned int buttons, bool prio);
|
||||
virtual bool mouse_click_event (const db::DPoint &p, unsigned int buttons, bool prio);
|
||||
|
|
|
|||
|
|
@ -57,6 +57,11 @@ public:
|
|||
SelectionService (lay::LayoutViewBase *view);
|
||||
~SelectionService ();
|
||||
|
||||
lay::ViewService *view_service_interface ()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
void set_colors (tl::Color background, tl::Color color);
|
||||
void begin (const db::DPoint &pos);
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,11 @@ public:
|
|||
void begin (const db::DPoint &pos);
|
||||
void begin_pan (const db::DPoint &pos);
|
||||
|
||||
lay::ViewService *view_service_interface ()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
private:
|
||||
virtual bool mouse_move_event (const db::DPoint &p, unsigned int buttons, bool prio);
|
||||
virtual bool mouse_release_event (const db::DPoint &p, unsigned int buttons, bool prio);
|
||||
|
|
|
|||
Loading…
Reference in New Issue