From ce772c210e19adf7d90b793ff747eb6deb52a897 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Fri, 4 Mar 2016 21:21:45 +0100 Subject: [PATCH] Indegrate `DuplicateSurfaceCmd` into `Application` --- src/Application/ProjectionMappingState.cpp | 9 +++++++++ src/Application/ProjectionMappingState.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/Application/ProjectionMappingState.cpp b/src/Application/ProjectionMappingState.cpp index 6965010..ea2f8cf 100644 --- a/src/Application/ProjectionMappingState.cpp +++ b/src/Application/ProjectionMappingState.cpp @@ -183,6 +183,15 @@ void ProjectionMappingState::onKeyPressed(Application * app, ofKeyEventArgs & ar app->getCmdManager()->exec(new SelNextSurfaceCmd(app->getSurfaceManager())); } break; + + case 'd': + if(app->getSurfaceManager()->getSelectedSurface() != 0){ + app->getCmdManager()->exec( + new DuplicateSurfaceCmd( + app->getSurfaceManager()->getSelectedSurface(), + app->getSurfaceManager())); + } + break; default: break; diff --git a/src/Application/ProjectionMappingState.h b/src/Application/ProjectionMappingState.h index 22935d4..7fbbdee 100644 --- a/src/Application/ProjectionMappingState.h +++ b/src/Application/ProjectionMappingState.h @@ -21,6 +21,7 @@ #include "TogglePerspectiveCmd.h" #include "DeselectSurfaceCmd.h" #include "SetNextSourceCmd.h" +#include "DuplicateSurfaceCmd.h" #include "SurfaceType.h" #include "Gui.h"