From 1e41dab7b5b515a9ff8f654b09017cd535605f00 Mon Sep 17 00:00:00 2001 From: Palana Date: Wed, 15 Oct 2014 22:05:56 +0200 Subject: [PATCH] Open source properties on double click --- obs/window-basic-main.cpp | 12 ++++++++++++ obs/window-basic-main.hpp | 1 + 2 files changed, 13 insertions(+) diff --git a/obs/window-basic-main.cpp b/obs/window-basic-main.cpp index 6b96d097c..35941c288 100644 --- a/obs/window-basic-main.cpp +++ b/obs/window-basic-main.cpp @@ -1745,6 +1745,18 @@ void OBSBasic::on_sources_customContextMenuRequested(const QPoint &pos) popup.exec(QCursor::pos()); } +void OBSBasic::on_sources_itemDoubleClicked(QListWidgetItem *witem) +{ + if (!witem) + return; + + OBSSceneItem item = GetSceneItem(witem); + OBSSource source = obs_sceneitem_get_source(item); + + if (source) + CreatePropertiesWindow(source); +} + void OBSBasic::AddSource(const char *id) { if (id && *id) { diff --git a/obs/window-basic-main.hpp b/obs/window-basic-main.hpp index 824ea002b..2c4461d5b 100644 --- a/obs/window-basic-main.hpp +++ b/obs/window-basic-main.hpp @@ -265,6 +265,7 @@ private slots: void on_sources_currentItemChanged(QListWidgetItem *current, QListWidgetItem *prev); void on_sources_customContextMenuRequested(const QPoint &pos); + void on_sources_itemDoubleClicked(QListWidgetItem *item); void on_actionAddSource_triggered(); void on_actionRemoveSource_triggered(); void on_actionInteract_triggered();