UI: Add workaround for scenes being unselected

master
gxalpha 2022-08-28 04:20:09 +02:00 committed by Matt Gajownik
parent dbcafb62ff
commit 08e4ee6557
2 changed files with 11 additions and 0 deletions

View File

@ -236,3 +236,11 @@ void SceneTree::rowsInserted(const QModelIndex &parent, int start, int end)
QListWidget::rowsInserted(parent, start, end);
}
// Workaround for QTBUG-105870. Remove once that is solved upstream.
void SceneTree::selectionChanged(const QItemSelection &selected,
const QItemSelection &deselected)
{
if (selected.count() == 0)
setCurrentRow(deselected.indexes().front().row());
}

View File

@ -38,6 +38,9 @@ protected:
virtual void dragLeaveEvent(QDragLeaveEvent *event) override;
virtual void rowsInserted(const QModelIndex &parent, int start,
int end) override;
virtual void
selectionChanged(const QItemSelection &selected,
const QItemSelection &deselected) override;
signals:
void scenesReordered();