mirror of https://github.com/KLayout/klayout.git
FIxing issue #2194 (can't attach key binding to 'forward'/'backward')
This commit is contained in:
parent
564111af77
commit
e6e85ab3b3
|
|
@ -621,6 +621,11 @@ struct LAYBASIC_PUBLIC AbstractMenuItem
|
||||||
return m_primary;
|
return m_primary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void set_primary (bool p)
|
||||||
|
{
|
||||||
|
m_primary = p;
|
||||||
|
}
|
||||||
|
|
||||||
std::list <AbstractMenuItem> children;
|
std::list <AbstractMenuItem> children;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
|
|
@ -197,6 +197,12 @@ PluginDeclaration::init_menu (lay::Dispatcher *dispatcher)
|
||||||
|
|
||||||
if (! m->copy_from.empty ()) {
|
if (! m->copy_from.empty ()) {
|
||||||
|
|
||||||
|
// As a general strategy for now we take primary ownership from the copy source as pass it to
|
||||||
|
// the copy. This is important for "next/prev_display_state" as the first registry is @toolbar
|
||||||
|
// (which is not accessible by Setup menu) and the second one is "zoom_menu" which should be
|
||||||
|
// the primary one. For later, we may want to make this configurable (move/leave primary flag).
|
||||||
|
menu.find_item_exact (m->copy_from)->set_primary (false);
|
||||||
|
|
||||||
menu.insert_item (m->insert_pos, m->menu_name, menu.action (m->copy_from));
|
menu.insert_item (m->insert_pos, m->menu_name, menu.action (m->copy_from));
|
||||||
|
|
||||||
} else if (m->separator) {
|
} else if (m->separator) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue