UI: Check item whether selected before select
To prevent item from being selected again, then mess up the qt internal list order.
This commit is contained in:
parent
c57a291316
commit
559925ebaa
1 changed files with 1 additions and 1 deletions
|
|
@ -1154,7 +1154,7 @@ void SourceTree::SelectItem(obs_sceneitem_t *sceneitem, bool select)
|
|||
return;
|
||||
|
||||
QModelIndex index = stm->createIndex(i, 0);
|
||||
if (index.isValid())
|
||||
if (index.isValid() && select != selectionModel()->isSelected(index))
|
||||
selectionModel()->select(
|
||||
index, select ? QItemSelectionModel::Select
|
||||
: QItemSelectionModel::Deselect);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue