diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index 788721215..fa594e543 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -302,12 +302,12 @@ OBSBasic::OBSBasic(QWidget *parent) connect(diskFullTimer, SIGNAL(timeout()), this, SLOT(CheckDiskSpaceRemaining())); - QAction *renameScene = new QAction(ui->scenesDock); + renameScene = new QAction(ui->scenesDock); renameScene->setShortcutContext(Qt::WidgetWithChildrenShortcut); connect(renameScene, SIGNAL(triggered()), this, SLOT(EditSceneName())); ui->scenesDock->addAction(renameScene); - QAction *renameSource = new QAction(ui->sourcesDock); + renameSource = new QAction(ui->sourcesDock); renameSource->setShortcutContext(Qt::WidgetWithChildrenShortcut); connect(renameSource, SIGNAL(triggered()), this, SLOT(EditSceneItemName())); @@ -4390,6 +4390,7 @@ void OBSBasic::on_scenes_currentItemChanged(QListWidgetItem *current, void OBSBasic::EditSceneName() { + ui->scenesDock->removeAction(renameScene); QListWidgetItem *item = ui->scenes->currentItem(); Qt::ItemFlags flags = item->flags(); @@ -5424,6 +5425,8 @@ void OBSBasic::SceneNameEdited(QWidget *editor, obs_source_t *source = obs_scene_get_source(scene); RenameListItem(this, ui->scenes, source, text); + ui->scenesDock->addAction(renameScene); + if (api) api->on_event(OBS_FRONTEND_EVENT_SCENE_LIST_CHANGED); diff --git a/UI/window-basic-main.hpp b/UI/window-basic-main.hpp index 0296e512d..8e960c675 100644 --- a/UI/window-basic-main.hpp +++ b/UI/window-basic-main.hpp @@ -282,6 +282,8 @@ private: QPointer deinterlaceMenu; QPointer perSceneTransitionMenu; QPointer shortcutFilter; + QPointer renameScene; + QPointer renameSource; QPointer programWidget; QPointer programLayout;