Commit 3c6b2441 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Backport fix for incorrect bin rename

CCBUG: 368206
parent 443a7b8c
......@@ -311,7 +311,18 @@ class BinItemDelegate: public QStyledItemDelegate
{
public:
explicit BinItemDelegate(QObject *parent = nullptr): QStyledItemDelegate(parent)
, m_editorOpen(false)
{
connect(this, &QStyledItemDelegate::closeEditor, [&]() {
m_editorOpen = false;
});
}
void setEditorData(QWidget *w, const QModelIndex &i) const override
{
if (!m_editorOpen) {
QStyledItemDelegate::setEditorData(w, i);
m_editorOpen = true;
}
}
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE
......@@ -489,6 +500,8 @@ public:
QStyledItemDelegate::paint(painter, option, index);
}
}
private:
mutable bool m_editorOpen;
};
LineEventEater::LineEventEater(QObject *parent) : QObject(parent)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment