diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 49a715b7dd..931c7a31d1 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,8 @@ +2004-05-04 Angus Leeming + + * XFormsToolbar.C (show, hide): do nothing if the toolbar is + already visible/invisible, respectively. + 2004-05-04 Angus Leeming * XWorkArea.C (XWorkArea): set the color of the background, hidden diff --git a/src/frontends/xforms/XFormsToolbar.C b/src/frontends/xforms/XFormsToolbar.C index 5fef865c86..283e630932 100644 --- a/src/frontends/xforms/XFormsToolbar.C +++ b/src/frontends/xforms/XFormsToolbar.C @@ -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();