Fixed a bug in panel locking
This commit is contained in:
parent
1ce8a626eb
commit
55176fb70f
1 changed files with 13 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue