mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 04:42:18 +02:00
UI: Fix scene list crash
The original change in obsproject/obs-studio#7200 seems to have been based upon the idea that if the "selected" parameter has no values, then the "deselected" parameter must have values, which is clearly an unsafe assumption to have make given that it causes an assert crash in Qt when both parameters have 0 values contained within them.
This commit is contained in:
parent
3cde5dd48a
commit
361eebc6f3
@ -253,6 +253,6 @@ void SceneTree::rowsInserted(const QModelIndex &parent, int start, int end)
|
||||
void SceneTree::selectionChanged(const QItemSelection &selected,
|
||||
const QItemSelection &deselected)
|
||||
{
|
||||
if (selected.count() == 0)
|
||||
if (selected.count() == 0 && deselected.count() > 0)
|
||||
setCurrentRow(deselected.indexes().front().row());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user