From dddce19ed272a61948c3b958c46c4a59e735bf99 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Fri, 22 Apr 2005 15:41:29 +0000 Subject: [PATCH] Please Andre and make InsetBranch::getStatus more compact git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9859 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/ChangeLog | 4 ++++ src/insets/insetbranch.C | 15 ++++----------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index f4408295f4..33b6969f02 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,7 @@ +2005-04-22 Georg Baum + + * insetbranch.C (getStatus): make the code more compact + 2005-04-22 Jean-Marc Lasgouttes * insetcollapsable.C (doDispatch): do not pass through double/triple diff --git a/src/insets/insetbranch.C b/src/insets/insetbranch.C index c2fc42df2c..cfc85bc053 100644 --- a/src/insets/insetbranch.C +++ b/src/insets/insetbranch.C @@ -202,17 +202,10 @@ bool InsetBranch::getStatus(LCursor & cur, FuncRequest const & cmd, || cmd.argument.empty()) { BranchList const & branchlist = cur.buffer().params().branchlist(); - if (isBranchSelected(branchlist)) { - if (status() != Open) - flag.enabled(true); - else - flag.enabled(false); - } else { - if (status() != Collapsed) - flag.enabled(true); - else - flag.enabled(false); - } + if (isBranchSelected(branchlist)) + flag.enabled(status() != Open); + else + flag.enabled(status() != Collapsed); } else flag.enabled(true); break;