mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-01-16 02:08:35 -05:00
UI: If scene/source names exist, start from 2
Currently if you have a scene, "Scene" for example, and you create a new scene, the dialog will pop up with a default name, but it'll start with "Scene 1" instead of "Scene 2". Same thing occurs with sources. This fixes that to start from 2 instead.
This commit is contained in:
@@ -204,7 +204,7 @@ OBSBasicSourceSelect::OBSBasicSourceSelect(OBSBasic *parent, const char *id_)
|
||||
QString placeHolderText{QT_UTF8(GetSourceDisplayName(id))};
|
||||
|
||||
QString text{placeHolderText};
|
||||
int i = 1;
|
||||
int i = 2;
|
||||
obs_source_t *source = nullptr;
|
||||
while ((source = obs_get_source_by_name(QT_TO_UTF8(text)))) {
|
||||
obs_source_release(source);
|
||||
|
||||
Reference in New Issue
Block a user