mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-01-25 14:48:24 -05:00
Do not rename items if the name is the same
This commit is contained in:
@@ -1534,7 +1534,7 @@ void OBSBasic::SceneNameEdited(QWidget *editor,
|
||||
const char *prevName = obs_source_getname(sceneSource);
|
||||
obs_source_t source = obs_get_source_by_name(text.c_str());
|
||||
|
||||
if (source) {
|
||||
if (source && text.compare(prevName) != 0) {
|
||||
QListWidgetItem *listItem = ui->scenes->currentItem();
|
||||
if (listItem)
|
||||
listItem->setText(QT_UTF8(prevName));
|
||||
@@ -1560,7 +1560,7 @@ void OBSBasic::SceneItemNameEdited(QWidget *editor,
|
||||
const char *prevName = obs_source_getname(itemSource);
|
||||
obs_source_t source = obs_get_source_by_name(text.c_str());
|
||||
|
||||
if (source) {
|
||||
if (source && text.compare(prevName) != 0) {
|
||||
QListWidgetItem *listItem = ui->sources->currentItem();
|
||||
if (listItem)
|
||||
listItem->setText(QT_UTF8(prevName));
|
||||
|
||||
Reference in New Issue
Block a user