Jean-Marc Lasgouttes a écrit :
Abdelrazak> At the time, I had the feeling that menus opened faster
Abdelrazak> yes. But I did not measured it scientifically. Beside, the
Abdelrazak> code is a bit simpler in "QLPopupMenu.C" because of having
Abdelrazak> a private Menu member in "QLPopupMenu.h". If you really
Abdelrazak> don't want this, I can revert to a dynamically created
Abdelrazak> Menu but I thought that this clear() method is simple
Abdelrazak> enough and is logical together with size(), empty(), etc.

Could you point me to the part of the code where things happen?
Sure, this is in QLPopuoMenu.C: line 71
clear is used with private member 'topLevelMenu'

void QLPopupMenu::update()
{
   lyxerr[Debug::GUI] << BOOST_CURRENT_FUNCTION << endl;
   lyxerr[Debug::GUI] << "\tTriggered menu: " << name_ << endl;

   clear();
   topLevelMenu.clear();

   if (name_.empty())
       return;

   Menu const & fromLyxMenu = owner_->backend().getMenu(name_);
   owner_->backend().expand(fromLyxMenu, topLevelMenu, owner_->view());
if (!owner_->backend().hasMenu(topLevelMenu.name())) { lyxerr[Debug::GUI] << "\tWARNING: menu seems empty" << topLevelMenu.name() << endl;
   }
   populate(this, &topLevelMenu);

   specialMacXmenuHack();
}

JMarc



Reply via email to