]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt2/QDocument.C
Overhaul the branches code.
[features.git] / src / frontends / qt2 / QDocument.C
index af27a2c7064d8d33b4a42f578916be76c6145f0f..89c2de1fd4983fbd92c2868d3c2d6df8899383dd 100644 (file)
@@ -27,7 +27,6 @@
 #include "support/lstrings.h"
 #include "lyxtextclasslist.h"
 #include "floatplacement.h"
-#include "LColor.h"
 
 #include <qpushbutton.h>
 #include <qmultilineedit.h>
@@ -388,24 +387,7 @@ void QDocument::apply()
 
        params.footskip = widgetsToLength(m->footskipLE, m->footskipUnit);
 
-       // branches
-       string const all_branches = params.branchlist().allBranches();
-       if (!all_branches.empty()) {
-               std::vector<string> all = getVectorFromString(all_branches, "|");
-               for (unsigned i = 0; i < all.size(); ++i) {
-                       string const current_branch = all[i].c_str();
-                       string x11hexname = params.branchlist().getColor(current_branch);
-                       // check that we have a valid color!
-                       if (x11hexname.empty() || x11hexname[0] != '#')
-                               x11hexname = lcolor.getX11Name(LColor::background);
-                       // display the new color
-                       controller().setBranchColor(current_branch, x11hexname);
-               }
-       }
-       if (branchlist_.empty())
-               branchlist_ = params.branchlist();
        params.branchlist() = branchlist_;
-       branchlist_.clear();
 }
 
 
@@ -654,6 +636,7 @@ void QDocument::update_contents()
                params.footskip, defaultUnit);
 
        // branches
+       branchlist_ = params.branchlist();
        dialog_->updateBranchView();
 }