From 8a920b087e0bb7d537512b45de6814dfb15bc2d9 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Sat, 8 Nov 2014 14:05:16 +0100 Subject: [PATCH] Fix [issue 24] fbo source not highlighted as active in sources editor when the selected surface has it assigned --- src/UserInterface/SourcesEditor.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/UserInterface/SourcesEditor.cpp b/src/UserInterface/SourcesEditor.cpp index 622fef7..7cca943 100644 --- a/src/UserInterface/SourcesEditor.cpp +++ b/src/UserInterface/SourcesEditor.cpp @@ -133,7 +133,14 @@ namespace piMapper { fboSelector->enable(); } BaseSource* source = surfaceManager->getSelectedSurface()->getSource(); - selectSourceRadioButton(source->getPath()); + + // TODO: getPath should be replaced with something like getId() as now we + // use paths for loadable sources and names for FBOs + if (source->getType() == SourceType::SOURCE_TYPE_FBO) { + selectSourceRadioButton(source->getName()); + } else { + selectSourceRadioButton(source->getPath()); + } } void SourcesEditor::setSurfaceManager(SurfaceManager* newSurfaceManager) {