Ignore source deselection until multiple selection is implemented

master
Palana 2014-10-15 01:59:07 +02:00
parent db9204de82
commit a88700540e
1 changed files with 2 additions and 13 deletions

View File

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