diff --git a/src/Application/TextureMappingState.cpp b/src/Application/TextureMappingState.cpp index aa17755..40158b6 100644 --- a/src/Application/TextureMappingState.cpp +++ b/src/Application/TextureMappingState.cpp @@ -45,7 +45,11 @@ void TextureMappingState::onKeyPressed(Application * app, ofKeyEventArgs & args) } break; } - +} + +void TextureMappingState::onBackgroundPressed(Application * app, GuiBackgroundEvent & e){ + app->getCmdManager()->exec( + new DeselectTexCoordCmd(app->getGui()->getTextureEditor())); } } // namespace piMapper diff --git a/src/Application/TextureMappingState.h b/src/Application/TextureMappingState.h index b2aca60..dba6837 100644 --- a/src/Application/TextureMappingState.h +++ b/src/Application/TextureMappingState.h @@ -19,6 +19,7 @@ class TextureMappingState : public ApplicationBaseState { static TextureMappingState * instance(); void draw(Application * app); void onKeyPressed(Application * app, ofKeyEventArgs & args); + void onBackgroundPressed(Application * app, GuiBackgroundEvent & e); private: static TextureMappingState * _instance; diff --git a/src/Surfaces/SurfaceManagerGui.cpp b/src/Surfaces/SurfaceManagerGui.cpp index 679f16e..a04ef2d 100644 --- a/src/Surfaces/SurfaceManagerGui.cpp +++ b/src/Surfaces/SurfaceManagerGui.cpp @@ -125,8 +125,7 @@ void SurfaceManagerGui::mousePressed(ofMouseEventArgs & args){ &textureEditor)); }else{ - // TODO: Create command for this - textureEditor.unselectAllJoints(); + Gui::instance()->notifyBackgroundPressed(args); } }else if(guiMode == GuiMode::PROJECTION_MAPPING){