mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-23 16:52:02 +00:00
avoid costly updating
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20637 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c56fa287b6
commit
cdff3df5d1
@ -207,11 +207,19 @@ void IconPalette::hideEvent(QHideEvent * event )
|
||||
void IconPalette::updateParent()
|
||||
{
|
||||
bool enable = false;
|
||||
// FIXME: so this is commented out for speed considerations
|
||||
// true fix is to repair the updating mechanism of the toolbar
|
||||
#if 0
|
||||
for (int i = 0; i < actions_.size(); ++i)
|
||||
if (actions_.at(i)->isEnabled()) {
|
||||
enable = true;
|
||||
break;
|
||||
}
|
||||
#else
|
||||
// we check only the first action to enable/disable the menu
|
||||
if (actions_.size() > 0)
|
||||
enable = actions_.at(0)->isEnabled();
|
||||
#endif
|
||||
|
||||
parentWidget()->setEnabled(enable);
|
||||
}
|
||||
@ -256,11 +264,19 @@ void ButtonMenu::add(QAction * action)
|
||||
void ButtonMenu::updateParent()
|
||||
{
|
||||
bool enable = false;
|
||||
// FIXME: so this is commented out for speed considerations
|
||||
// true fix is to repair the updating mechanism of the toolbar
|
||||
#if 0
|
||||
for (int i = 0; i < actions_.size(); ++i)
|
||||
if (actions_.at(i)->isEnabled()) {
|
||||
enable = true;
|
||||
break;
|
||||
}
|
||||
#else
|
||||
// we check only the first action to enable/disable the menu
|
||||
if (actions_.size() > 0)
|
||||
enable = actions_.at(0)->isEnabled();
|
||||
#endif
|
||||
|
||||
parentWidget()->setEnabled(enable);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user