mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-30 05:12:40 +00:00
* setItemDelegate does not free the old delegate. So we better only create one instance and reuse that.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23172 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
14b7f34818
commit
b313333c1a
@ -170,7 +170,8 @@ GuiCompleter::GuiCompleter(GuiWorkArea * gui, QObject * parent)
|
||||
listView->setIndentation(0);
|
||||
setPopup(listView);
|
||||
popup()->setItemDelegateForColumn(1, new PixmapItemDelegate(this));
|
||||
|
||||
rtlItemDelegate_ = new RtlItemDelegate(this);
|
||||
|
||||
// create timeout timers
|
||||
popup_timer_.setSingleShot(true);
|
||||
inline_timer_.setSingleShot(true);
|
||||
@ -410,7 +411,7 @@ void GuiCompleter::updateModel(Cursor & cur, bool popupUpdate, bool inlineUpdate
|
||||
|
||||
// turn the direction of the strings in the popup.
|
||||
// Qt does not do that itself.
|
||||
popup()->setItemDelegateForColumn(0, rtl ? new RtlItemDelegate : 0);
|
||||
popup()->setItemDelegateForColumn(0, rtl ? rtlItemDelegate_ : 0);
|
||||
|
||||
// set new model
|
||||
Inset::CompletionList const * list
|
||||
|
@ -31,6 +31,7 @@ class Buffer;
|
||||
namespace frontend {
|
||||
|
||||
class GuiWorkArea;
|
||||
class RtlItemDelegate;
|
||||
|
||||
class GuiCompleter : private QCompleter
|
||||
{
|
||||
@ -113,6 +114,8 @@ private:
|
||||
/// operations like backspace. Hence, we have to keep this flag
|
||||
/// in addition to know whether the popup is to be kept visible.
|
||||
bool inlineVisible_;
|
||||
///
|
||||
RtlItemDelegate * rtlItemDelegate_;
|
||||
}; // GuiCompleter
|
||||
|
||||
} // namespace frontend
|
||||
|
Loading…
Reference in New Issue
Block a user