Do nothing on calls to XFormsToolbar::show, hide if the toolbar is

already visiblehidden respectively.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8735 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2004-05-04 14:50:36 +00:00
parent 37b93beec5
commit a81c35023a
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2004-05-04 Angus Leeming <leeming@lyx.org>
* XFormsToolbar.C (show, hide): do nothing if the toolbar is
already visible/invisible, respectively.
2004-05-04 Angus Leeming <leeming@lyx.org>
* XWorkArea.C (XWorkArea): set the color of the background, hidden

View File

@ -280,7 +280,10 @@ void C_ToolbarCB(FL_OBJECT * ob, long ac)
void XFormsToolbar::hide(bool update_metrics)
{
toolbar_->set(Box::Invisible);
if (!toolbar_->visible())
return;
toolbar_->set(Box::Invisible);
if (update_metrics)
owner_.updateMetrics();
}
@ -288,7 +291,10 @@ void XFormsToolbar::hide(bool update_metrics)
void XFormsToolbar::show(bool update_metrics)
{
toolbar_->set(Box::Visible);
if (toolbar_->visible())
return;
toolbar_->set(Box::Visible);
toolbar_->show();
if (update_metrics)
owner_.updateMetrics();