Browse Source

Exec `StartDragSurfaceCmd` on surfacePressed event

master
Krisjanis Rijnieks 9 years ago
parent
commit
57164d85c3
  1. 3
      src/Application/ProjectionMappingState.cpp
  2. 1
      src/Application/ProjectionMappingState.h

3
src/Application/ProjectionMappingState.cpp

@ -182,10 +182,11 @@ void ProjectionMappingState::onJointPressed(Application * app, GuiJointEvent & e
}
void ProjectionMappingState::onSurfacePressed(Application * app, GuiSurfaceEvent & e){
cout << "ProjectionMappingState::onSurfacePressed" << endl;
if(app->getSurfaceManager()->getSelectedSurface() != e.surface){
app->getCmdManager()->exec(new SelSurfaceCmd(app->getSurfaceManager(), e.surface ));
}
app->getCmdManager()->exec(new StartDragSurfaceCmd(e.surface));
}
} // namespace piMapper

1
src/Application/ProjectionMappingState.h

@ -17,6 +17,7 @@
#include "SelVertexCmd.h"
#include "SelSurfaceCmd.h"
#include "MvSelectionCmd.h"
#include "StartDragSurfaceCmd.h"
#include "TogglePerspectiveCmd.h"
#include "SurfaceType.h"
#include "Gui.h"

Loading…
Cancel
Save