Browse Source

Add deselect tex coord joints on background click

master
Krisjanis Rijnieks 9 years ago
parent
commit
555d0619f7
  1. 4
      src/Application/TextureMappingState.cpp
  2. 1
      src/Application/TextureMappingState.h
  3. 3
      src/Surfaces/SurfaceManagerGui.cpp

4
src/Application/TextureMappingState.cpp

@ -45,7 +45,11 @@ void TextureMappingState::onKeyPressed(Application * app, ofKeyEventArgs & args)
} }
break; break;
} }
}
void TextureMappingState::onBackgroundPressed(Application * app, GuiBackgroundEvent & e){
app->getCmdManager()->exec(
new DeselectTexCoordCmd(app->getGui()->getTextureEditor()));
} }
} // namespace piMapper } // namespace piMapper

1
src/Application/TextureMappingState.h

@ -19,6 +19,7 @@ class TextureMappingState : public ApplicationBaseState {
static TextureMappingState * instance(); static TextureMappingState * instance();
void draw(Application * app); void draw(Application * app);
void onKeyPressed(Application * app, ofKeyEventArgs & args); void onKeyPressed(Application * app, ofKeyEventArgs & args);
void onBackgroundPressed(Application * app, GuiBackgroundEvent & e);
private: private:
static TextureMappingState * _instance; static TextureMappingState * _instance;

3
src/Surfaces/SurfaceManagerGui.cpp

@ -125,8 +125,7 @@ void SurfaceManagerGui::mousePressed(ofMouseEventArgs & args){
&textureEditor)); &textureEditor));
}else{ }else{
// TODO: Create command for this Gui::instance()->notifyBackgroundPressed(args);
textureEditor.unselectAllJoints();
} }
}else if(guiMode == GuiMode::PROJECTION_MAPPING){ }else if(guiMode == GuiMode::PROJECTION_MAPPING){

Loading…
Cancel
Save