]> git.lyx.org Git - lyx.git/blobdiff - src/BranchList.cpp
Fix #7720: plain text export of branches should contain only content of the inset.
[lyx.git] / src / BranchList.cpp
index 1277be23281a956a7d1dfe28314504ad0fac5655..7cb23ef5b499db62d99f25f3e99256c8cdef43cb 100644 (file)
@@ -48,6 +48,8 @@ Branch::Branch()
        // no theApp() with command line export
        if (theApp())
                theApp()->getRgbColor(Color_background, color_);
+       else
+               frontend::Application::getRgbColorUncached(Color_background, color_);
 }
 
 
@@ -106,9 +108,14 @@ void Branch::setColor(string const & str)
 {
        if (str.size() == 7 && str[0] == '#')
                color_ = rgbFromHexName(str);
-       else
+       else {
                // no color set or invalid color - use normal background
-               theApp()->getRgbColor(Color_background, color_);
+               // no theApp() with command line export
+               if (theApp())
+                       theApp()->getRgbColor(Color_background, color_);
+               else
+                       frontend::Application::getRgbColorUncached(Color_background, color_);
+       }
 }