Browse Source

Refine ProjectionMappingMode::selectNext and PrevSurface

Do not create command if there is only one surface and it is selected.
master
Krisjanis Rijnieks 9 years ago
parent
commit
22572e3bda
  1. 10
      src/Application/Modes/ProjectionMappingMode.cpp

10
src/Application/Modes/ProjectionMappingMode.cpp

@ -424,12 +424,22 @@ void ProjectionMappingMode::selectSurface(Application * app, int i){
void ProjectionMappingMode::selectNextSurface(Application * app){
if(app->getSurfaceManager()->size()){
if( app->getSurfaceManager()->size() == 1 &&
app->getSurfaceManager()->getSelectedSurface() ==
app->getSurfaceManager()->getSurface(0)){
return;
}
app->getCmdManager()->exec(new SelNextSurfaceCmd(app->getSurfaceManager()));
}
}
void ProjectionMappingMode::selectPrevSurface(Application * app){
if(app->getSurfaceManager()->size()){
if( app->getSurfaceManager()->size() == 1 &&
app->getSurfaceManager()->getSelectedSurface() ==
app->getSurfaceManager()->getSurface(0)){
return;
}
app->getCmdManager()->exec(new SelPrevSurfaceCmd(app->getSurfaceManager()));
}
}

Loading…
Cancel
Save