Browse Source

Do not create `RmGridRowCmd` if surface rows are <= 1

master
Krisjanis Rijnieks 9 years ago
parent
commit
5d7937a482
  1. 12
      src/Application/ProjectionMappingState.cpp

12
src/Application/ProjectionMappingState.cpp

@ -84,11 +84,13 @@ void ProjectionMappingState::onKeyPressed(Application * app, ofKeyEventArgs & ar
if(app->getSurfaceManager()->getSelectedSurface()->getType() == if(app->getSurfaceManager()->getSelectedSurface()->getType() ==
SurfaceType::GRID_WARP_SURFACE){ SurfaceType::GRID_WARP_SURFACE){
// TODO: The command should not require projection editor pointer if(((GridWarpSurface *)app->getSurfaceManager()->getSelectedSurface())->getGridRows() > 1){
app->getCmdManager()->exec( // TODO: The command should not require projection editor pointer
new RmGridRowCmd( app->getCmdManager()->exec(
(GridWarpSurface *)app->getSurfaceManager()->getSelectedSurface(), new RmGridRowCmd(
app->getGui()->getProjectionEditor() )); (GridWarpSurface *)app->getSurfaceManager()->getSelectedSurface(),
app->getGui()->getProjectionEditor() ));
}
} }
} }
break; break;

Loading…
Cancel
Save