From 9a15e57b3bc1f28c2dcfffd97e3fa651389de989 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Thu, 3 Mar 2016 18:14:51 +0100 Subject: [PATCH] Select first surface when hitting tab and none is selected in texture edit mode --- src/Application/TextureMappingState.cpp | 2 ++ src/Application/TextureMappingState.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/Application/TextureMappingState.cpp b/src/Application/TextureMappingState.cpp index fb61fea..aa17755 100644 --- a/src/Application/TextureMappingState.cpp +++ b/src/Application/TextureMappingState.cpp @@ -40,6 +40,8 @@ void TextureMappingState::onKeyPressed(Application * app, ofKeyEventArgs & args) new SetNextSourceCmd( app->getSurfaceManager()->getSelectedSurface(), app->getGui()->getSourcesEditor())); + }else{ + app->getCmdManager()->exec(new SelNextSurfaceCmd(app->getSurfaceManager())); } break; } diff --git a/src/Application/TextureMappingState.h b/src/Application/TextureMappingState.h index 08d72a2..b2aca60 100644 --- a/src/Application/TextureMappingState.h +++ b/src/Application/TextureMappingState.h @@ -8,6 +8,7 @@ #include "SelPrevTexCoordCmd.h" #include "DeselectTexCoordCmd.h" #include "SetNextSourceCmd.h" +#include "SelNextSurfaceCmd.h" namespace ofx { namespace piMapper {