Explorar o código

UI: Check item whether selected before select
To prevent item from being selected again,
then mess up the qt internal list order.

bin %!s(int64=3) %!d(string=hai) anos
pai
achega
559925ebaa
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      UI/source-tree.cpp

+ 1 - 1
UI/source-tree.cpp

@@ -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);