Ignore source deselection until multiple selection is implemented
parent
db9204de82
commit
a88700540e
|
@ -821,7 +821,7 @@ void OBSBasic::RenameSources(QString newName, QString prevName)
|
||||||
|
|
||||||
void OBSBasic::SelectSceneItem(OBSScene scene, OBSSceneItem item, bool select)
|
void OBSBasic::SelectSceneItem(OBSScene scene, OBSSceneItem item, bool select)
|
||||||
{
|
{
|
||||||
if (scene != GetCurrentScene())
|
if (!select || scene != GetCurrentScene())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (int i = 0; i < ui->sources->count(); i++) {
|
for (int i = 0; i < ui->sources->count(); i++) {
|
||||||
|
@ -833,18 +833,7 @@ void OBSBasic::SelectSceneItem(OBSScene scene, OBSSceneItem item, bool select)
|
||||||
if (item != data.value<OBSSceneItem>())
|
if (item != data.value<OBSSceneItem>())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (select && witem->isSelected())
|
ui->sources->setCurrentItem(witem);
|
||||||
break;
|
|
||||||
|
|
||||||
if (!select && !witem->isSelected())
|
|
||||||
break;
|
|
||||||
|
|
||||||
QItemSelectionModel::SelectionFlags model = select ?
|
|
||||||
QItemSelectionModel::Select :
|
|
||||||
QItemSelectionModel::Deselect;
|
|
||||||
model |= QItemSelectionModel::Current;
|
|
||||||
|
|
||||||
ui->sources->setCurrentItem(witem, model);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue