]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetbranch.C
Bug fix in branches (was earlier fixed wrongly)
[lyx.git] / src / insets / insetbranch.C
index af18dd23cde5062188dacc8b6864af3611e07658..1262a52fad35b0089251fb19edf521a490350a32 100644 (file)
@@ -32,6 +32,7 @@ using std::ostringstream;
 void InsetBranch::init()
 {
        setInsetName("Branch");
+       setButtonLabel();
 }
 
 
@@ -98,10 +99,9 @@ void InsetBranch::setButtonLabel()
 
        setLabel("Branch: " + params_.branch);
        font.setColor(LColor::foreground);
-       string const color = params_.branchlist.getColor(params_.branch);
-       if (!color.empty()) {
+       if (!params_.branch.empty())
                setBackgroundColor(lcolor.getFromLyXName(params_.branch));
-       else
+       else
                setBackgroundColor(LColor::background);
        setLabelFont(font);
 }