]> git.lyx.org Git - features.git/commitdiff
* cosmetic
authorStefan Schimanski <sts@lyx.org>
Tue, 4 Mar 2008 09:43:42 +0000 (09:43 +0000)
committerStefan Schimanski <sts@lyx.org>
Tue, 4 Mar 2008 09:43:42 +0000 (09:43 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23425 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiCompleter.cpp

index 11348e5dcb95fc2c0d27b0637cbd39471080d6f6..f5a51fd24dd4b688d3807ba1950cb6302d39e505 100644 (file)
@@ -44,7 +44,7 @@ namespace frontend {
 class RtlItemDelegate : public QItemDelegate {
 public:
        explicit RtlItemDelegate(QObject * parent = 0)
-               : QItemDelegate(parent) {}
+               : QItemDelegate(parent), enabled_(false) {}
 
        void setEnabled(bool enabled = true)
        {
@@ -56,8 +56,10 @@ protected:
                QStyleOptionViewItem const & option,
                QRect const & rect, QString const & text) const
        {
-               if (!enabled_)
-                       return QItemDelegate::drawDisplay(painter, option, rect, text);
+               if (!enabled_) {
+                       QItemDelegate::drawDisplay(painter, option, rect, text);
+                       return;
+               }
 
                // FIXME: do this more elegantly
                docstring stltext = qstring_to_ucs4(text);
@@ -188,10 +190,11 @@ GuiCompleter::GuiCompleter(GuiWorkArea * gui, QObject * parent)
        listView->setIndentation(0);
        listView->setUniformRowHeights(true);
        setPopup(listView);
-       popup()->setItemDelegateForColumn(1, new PixmapItemDelegate(this));
+       
        rtlItemDelegate_ = new RtlItemDelegate(this);
        popup()->setItemDelegateForColumn(0, rtlItemDelegate_);
-
+       popup()->setItemDelegateForColumn(1, new PixmapItemDelegate(this));
+       
        // create timeout timers
        popup_timer_.setSingleShot(true);
        inline_timer_.setSingleShot(true);