From 57164d85c3f5e7d3a7dde4fc399d278b29435ef4 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Mon, 15 Feb 2016 17:08:58 +0100 Subject: [PATCH] Exec `StartDragSurfaceCmd` on surfacePressed event --- src/Application/ProjectionMappingState.cpp | 3 ++- src/Application/ProjectionMappingState.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Application/ProjectionMappingState.cpp b/src/Application/ProjectionMappingState.cpp index cf2c444..128c23a 100644 --- a/src/Application/ProjectionMappingState.cpp +++ b/src/Application/ProjectionMappingState.cpp @@ -182,10 +182,11 @@ void ProjectionMappingState::onJointPressed(Application * app, GuiJointEvent & e } void ProjectionMappingState::onSurfacePressed(Application * app, GuiSurfaceEvent & e){ - cout << "ProjectionMappingState::onSurfacePressed" << endl; if(app->getSurfaceManager()->getSelectedSurface() != e.surface){ app->getCmdManager()->exec(new SelSurfaceCmd(app->getSurfaceManager(), e.surface )); } + + app->getCmdManager()->exec(new StartDragSurfaceCmd(e.surface)); } } // namespace piMapper diff --git a/src/Application/ProjectionMappingState.h b/src/Application/ProjectionMappingState.h index 4dbdad8..690247c 100644 --- a/src/Application/ProjectionMappingState.h +++ b/src/Application/ProjectionMappingState.h @@ -17,6 +17,7 @@ #include "SelVertexCmd.h" #include "SelSurfaceCmd.h" #include "MvSelectionCmd.h" +#include "StartDragSurfaceCmd.h" #include "TogglePerspectiveCmd.h" #include "SurfaceType.h" #include "Gui.h"