Browse Source

Move mouseReleased from SurfaceManagerGui to states

To ProjectionMappingState
To TextureMappingState
master
Krisjanis Rijnieks 9 years ago
parent
commit
74c07b6234
  1. 3
      src/Application/States/ProjectionMappingState.cpp
  2. 5
      src/Application/States/TextureMappingState.cpp
  3. 6
      src/Surfaces/SurfaceManagerGui.cpp

3
src/Application/States/ProjectionMappingState.cpp

@ -291,7 +291,8 @@ void ProjectionMappingState::onMousePressed(Application * app, ofMouseEventArgs
void ProjectionMappingState::onMouseReleased(Application * app, ofMouseEventArgs & args){
Gui::instance()->onMouseReleased(args);
app->getGui()->mouseReleased(args);
app->getGui()->stopDrag();
app->getGui()->getProjectionEditor()->stopDragJoints();
}
void ProjectionMappingState::onMouseDragged(Application * app, ofMouseEventArgs & args){

5
src/Application/States/TextureMappingState.cpp

@ -149,7 +149,10 @@ void TextureMappingState::onMouseReleased(Application * app, ofMouseEventArgs &
// Alter mouse event args to match canvas translation
args.x -= _canvasTranslate.x;
args.y -= _canvasTranslate.y;
app->getGui()->mouseReleased(args);
//app->getGui()->mouseReleased(args);
app->getGui()->stopDrag();
app->getGui()->getTextureEditor()->stopDragJoints();
}
void TextureMappingState::onMouseDragged(Application * app, ofMouseEventArgs & args){

6
src/Surfaces/SurfaceManagerGui.cpp

@ -94,9 +94,9 @@ void SurfaceManagerGui::mousePressed(ofMouseEventArgs & args){
}
void SurfaceManagerGui::mouseReleased(ofMouseEventArgs & args){
stopDrag();
projectionEditor.stopDragJoints();
textureEditor.stopDragJoints();
//stopDrag();
//projectionEditor.stopDragJoints();
//textureEditor.stopDragJoints();
}
void SurfaceManagerGui::mouseDragged(ofMouseEventArgs & args){

Loading…
Cancel
Save