diff --git a/src/Application/ProjectionMappingState.cpp b/src/Application/ProjectionMappingState.cpp index ab6ddf2..286dc6b 100644 --- a/src/Application/ProjectionMappingState.cpp +++ b/src/Application/ProjectionMappingState.cpp @@ -109,6 +109,22 @@ void ProjectionMappingState::onKeyPressed(Application * app, ofKeyEventArgs & ar } break; + case '[': + if(app->getSurfaceManager()->getSelectedSurface() != 0){ + if(app->getSurfaceManager()->getSelectedSurface()->getType() == + SurfaceType::GRID_WARP_SURFACE){ + + if(((GridWarpSurface *)app->getSurfaceManager()->getSelectedSurface())->getGridCols() > 1){ + // TODO: The command should not require projection editor pointer + app->getCmdManager()->exec( + new RmGridColCmd( + (GridWarpSurface *)app->getSurfaceManager()->getSelectedSurface(), + app->getGui()->getProjectionEditor() )); + } + } + } + break; + default: break; } diff --git a/src/Application/ProjectionMappingState.h b/src/Application/ProjectionMappingState.h index c4569c4..23b2433 100644 --- a/src/Application/ProjectionMappingState.h +++ b/src/Application/ProjectionMappingState.h @@ -9,6 +9,7 @@ #include "AddGridRowCmd.h" #include "RmGridRowCmd.h" #include "AddGridColCmd.h" +#include "RmGridColCmd.h" #include "TogglePerspectiveCmd.h" #include "SurfaceType.h"