Skip to content

Commit e6e85ab

Browse files
author
Matthias Koefferlein
committed
FIxing issue #2194 (can't attach key binding to 'forward'/'backward')
1 parent 564111a commit e6e85ab

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/laybasic/laybasic/layAbstractMenu.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,11 @@ struct LAYBASIC_PUBLIC AbstractMenuItem
621621
return m_primary;
622622
}
623623

624+
void set_primary (bool p)
625+
{
626+
m_primary = p;
627+
}
628+
624629
std::list <AbstractMenuItem> children;
625630

626631
private:

src/laybasic/laybasic/layPlugin.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,12 @@ PluginDeclaration::init_menu (lay::Dispatcher *dispatcher)
197197

198198
if (! m->copy_from.empty ()) {
199199

200+
// As a general strategy for now we take primary ownership from the copy source as pass it to
201+
// the copy. This is important for "next/prev_display_state" as the first registry is @toolbar
202+
// (which is not accessible by Setup menu) and the second one is "zoom_menu" which should be
203+
// the primary one. For later, we may want to make this configurable (move/leave primary flag).
204+
menu.find_item_exact (m->copy_from)->set_primary (false);
205+
200206
menu.insert_item (m->insert_pos, m->menu_name, menu.action (m->copy_from));
201207

202208
} else if (m->separator) {

0 commit comments

Comments
 (0)