瀏覽代碼

UI: If group's name exist, start it from 2

Currently if you making a new group it named "Group 1" by default
instead of just "Group". This fixes it. The second group will be
named "Group 2".
SuslikV 7 年之前
父節點
當前提交
488c087d69
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      UI/source-tree.cpp

+ 3 - 3
UI/source-tree.cpp

@@ -640,15 +640,15 @@ Qt::DropActions SourceTreeModel::supportedDropActions() const
 QString SourceTreeModel::GetNewGroupName()
 {
 	OBSScene scene = GetCurrentScene();
-	QString name;
+	QString name = QTStr("Group");
 
-	int i = 1;
+	int i = 2;
 	for (;;) {
-		name = QTStr("Basic.Main.Group").arg(QString::number(i++));
 		obs_sceneitem_t *group = obs_scene_get_group(scene,
 				QT_TO_UTF8(name));
 		if (!group)
 			break;
+		name = QTStr("Basic.Main.Group").arg(QString::number(i++));
 	}
 
 	return name;