MCPcopy Create free account
hub / github.com/KLayout/klayout / menu_about_to_show

Method menu_about_to_show

src/laybasic/laybasic/layAbstractMenu.cc:563–589  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

561
562#if defined(HAVE_QT)
563void
564Action::menu_about_to_show ()
565{
566 // keeps a reference to self in case the action handler code removes actions
567 tl::shared_ptr<Action> self_holder (this);
568
569 BEGIN_PROTECTED
570
571 on_menu_opening_event ();
572 menu_opening ();
573
574 if (! mp_dispatcher || ! mp_dispatcher->menu ()) {
575 return;
576 }
577 AbstractMenuItem *item = mp_dispatcher->menu ()->find_item_for_action (this);
578 if (! item ) {
579 return;
580 }
581
582 for (auto i = item->children.begin (); i != item->children.end (); ++i) {
583 if (i->action ()) {
584 i->action ()->sync_qaction ();
585 }
586 }
587
588 END_PROTECTED
589}
590#endif
591
592#if defined(HAVE_QT)

Callers

nothing calls this directly

Calls 6

menuMethod · 0.80
find_item_for_actionMethod · 0.80
sync_qactionMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
actionMethod · 0.45

Tested by

no test coverage detected