]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/ColorCache.cpp
fix completion painting for RTL (inline completion and completion list)
[lyx.git] / src / frontends / qt4 / ColorCache.cpp
index 4ae3d065bb7304a8a85a419f818df425861e4f47..69520fc7384ab3de81d6d820e77fa78022752d3d 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <string>
 
+
 namespace lyx {
 
 void ColorCache::init()
@@ -27,11 +28,14 @@ void ColorCache::init()
 
 
 /// get the given color
-QColor const & ColorCache::get(ColorCode color) const
+QColor ColorCache::get(ColorCode color) const
 {
        if (!initialized_)
                const_cast<ColorCache *>(this)->init();
-       return lcolors_[color];
+       if (color <= Color_ignore)
+               return lcolors_[color];
+       // used by branches
+       return QColor(lcolor.getX11Name(color).c_str()); 
 }