From c8600dc0a14c28bd06e3328c762433ef3f1d4091 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Tue, 1 Jun 2004 11:10:09 +0000 Subject: [PATCH] Fix problem with toolbars always visible at startup. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8789 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/xforms/ChangeLog | 6 ++++++ src/frontends/xforms/LayoutEngine.C | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index c8a4e2028b..d06075e4dc 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,9 @@ +2004-06-01 Angus Leeming + + * LayoutEngine.C (c-tor): initialize visible_ as false. + (set): only invoke hide() if the widget was visible and is to + be no longer. + 2004-05-28 Lars Gullik Bjonnes * forms/Makefile.am (MAINTAINERCLEANFILES): rename as DISTCLEANFILES diff --git a/src/frontends/xforms/LayoutEngine.C b/src/frontends/xforms/LayoutEngine.C index 7a4cd9ade9..00e9a42304 100644 --- a/src/frontends/xforms/LayoutEngine.C +++ b/src/frontends/xforms/LayoutEngine.C @@ -97,7 +97,7 @@ Box::Packing Box::default_packing_ = Box::Shrink; Box::Box(dimension_t min_w, dimension_t min_h) - : visible_(false), + : visible_(true), min_w_(min_w), min_h_(min_h), w_(min_w), @@ -193,7 +193,7 @@ Box::PreferedVisibility Box::preferedVisibility() const void Box::set(PreferedVisibility pv) { prefered_visibility_ = pv; - if (pv == Invisible) + if (pv == Invisible && visible_) hide(); }