diff --git a/src/Application/ProjectionMappingState.cpp b/src/Application/ProjectionMappingState.cpp index 5917413..2bf0a3a 100644 --- a/src/Application/ProjectionMappingState.cpp +++ b/src/Application/ProjectionMappingState.cpp @@ -64,7 +64,21 @@ void ProjectionMappingState::onKeyPressed(Application * app, ofKeyEventArgs & ar (QuadSurface *)app->getSurfaceManager()->getSelectedSurface() ) ); } 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 AddGridRowCmd( + (GridWarpSurface *)app->getSurfaceManager()->getSelectedSurface(), + app->getGui()->getProjectionEditor() )); + } + } + break; + default: break; } diff --git a/src/Application/ProjectionMappingState.h b/src/Application/ProjectionMappingState.h index bdea4f5..f0033d9 100644 --- a/src/Application/ProjectionMappingState.h +++ b/src/Application/ProjectionMappingState.h @@ -6,6 +6,7 @@ #include "ofGraphics.h" #include "AddSurfaceCmd.h" #include "RmSurfaceCmd.h" +#include "AddGridRowCmd.h" #include "TogglePerspectiveCmd.h" #include "SurfaceType.h"