Browse Source

Integrate `AddGridColCmd` into `Application`

master
Krisjanis Rijnieks 9 years ago
parent
commit
62a11838ac
  1. 14
      src/Application/ProjectionMappingState.cpp
  2. 1
      src/Application/ProjectionMappingState.h

14
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;

1
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"

Loading…
Cancel
Save