From 68c8fa3e176bb2fd810005028e05bdecc0a2ed99 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Mon, 30 Jun 2014 00:40:51 -0700 Subject: [PATCH] Do not rename items if the name is the same --- obs/window-basic-main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/obs/window-basic-main.cpp b/obs/window-basic-main.cpp index 72cc9cf21..6f2cbfeb6 100644 --- a/obs/window-basic-main.cpp +++ b/obs/window-basic-main.cpp @@ -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));