File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff 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
626631private:
Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments