From: Angus Leeming Date: Tue, 4 May 2004 14:50:36 +0000 (+0000) Subject: Do nothing on calls to XFormsToolbar::show, hide if the toolbar is X-Git-Tag: 1.6.10~15242 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=a81c35023a74fb11a39cc08cf0891cb52c6d4072;p=features.git 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 --- 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();