diff --git a/src/Application/ProjectionMappingState.cpp b/src/Application/ProjectionMappingState.cpp index 8873318..5313916 100644 --- a/src/Application/ProjectionMappingState.cpp +++ b/src/Application/ProjectionMappingState.cpp @@ -92,6 +92,20 @@ void ProjectionMappingState::onKeyPressed(Application * app, ofKeyEventArgs & ar } } break; + + case ']': + if(app->getSurfaceManager()->getSelectedSurface() != 0){ + if(app->getSurfaceManager()->getSelectedSurface()->getType() == + SurfaceType::GRID_WARP_SURFACE){ + + // TODO: The command should not require projection editor pointer + app->getCmdManager()->exec( + new AddGridColCmd( + (GridWarpSurface *)app->getSurfaceManager()->getSelectedSurface(), + app->getGui()->getProjectionEditor() )); + } + } + break; default: break; diff --git a/src/Application/ProjectionMappingState.h b/src/Application/ProjectionMappingState.h index 1aa0497..c4569c4 100644 --- a/src/Application/ProjectionMappingState.h +++ b/src/Application/ProjectionMappingState.h @@ -8,6 +8,7 @@ #include "RmSurfaceCmd.h" #include "AddGridRowCmd.h" #include "RmGridRowCmd.h" +#include "AddGridColCmd.h" #include "TogglePerspectiveCmd.h" #include "SurfaceType.h"