Просмотр исходного кода

UI: Fix unnecessary GetCurrentScene() call

Missed this with the parent commit; the scene variable is now already
available, thus there is no need to call GetCurrentScene() twice.
Lain 2 лет назад
Родитель
Сommit
c8d95005c1
1 измененных файлов с 1 добавлено и 3 удалено
  1. 1 3
      UI/window-basic-preview.cpp

+ 1 - 3
UI/window-basic-preview.cpp

@@ -2476,9 +2476,7 @@ void OBSBasicPreview::DrawSpacingHelpers()
 	if (itemSize.x == 0.0f || itemSize.y == 0.0f)
 		return;
 
-	obs_sceneitem_t *parentGroup =
-		obs_sceneitem_get_group(main->GetCurrentScene(), item);
-
+	obs_sceneitem_t *parentGroup = obs_sceneitem_get_group(scene, item);
 	if (parentGroup && obs_sceneitem_locked(parentGroup))
 		return;