Fixed a bug in panel locking

This commit is contained in:
Joel Holdsworth 2009-04-14 23:43:17 +01:00
parent 1ce8a626eb
commit 55176fb70f

View file

@ -150,10 +150,20 @@ PanelBar::on_hide()
void
PanelBar::on_lock()
{
static bool is_locking = false;
REQUIRE(lockItem);
const bool lock = !panel.is_locked();
panel.lock(lock);
lockItem->set_active(lock);
if(!is_locking)
{
is_locking = true;
const bool lock = !panel.is_locked();
panel.lock(lock);
lockItem->set_active(lock);
is_locking = false;
}
}
} // widgets