]> git.lyx.org Git - features.git/commitdiff
Do nothing on calls to XFormsToolbar::show, hide if the toolbar is
authorAngus Leeming <leeming@lyx.org>
Tue, 4 May 2004 14:50:36 +0000 (14:50 +0000)
committerAngus Leeming <leeming@lyx.org>
Tue, 4 May 2004 14:50:36 +0000 (14:50 +0000)
already visiblehidden respectively.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8735 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/xforms/ChangeLog
src/frontends/xforms/XFormsToolbar.C

index 49a715b7ddd8cc43092f0817642b15e58c9fcfc2..931c7a31d163b2dc151a2f45a5991fc6ba79fefc 100644 (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
index 5fef865c863e15b16d76bf5cf73fc50481a9a87f..283e630932b5d08bc1449489780a1a8066a19dce 100644 (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();