From b6b0c177132514ca00d0e9d0fa8e21c1c2af907a Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Wed, 2 Nov 2016 17:27:50 +0100 Subject: [PATCH] Make use of DeselectTexCoordCmd when click drag all coords --- src/Application/Modes/TextureMappingMode.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Application/Modes/TextureMappingMode.cpp b/src/Application/Modes/TextureMappingMode.cpp index 80708d0..c31a276 100644 --- a/src/Application/Modes/TextureMappingMode.cpp +++ b/src/Application/Modes/TextureMappingMode.cpp @@ -204,6 +204,12 @@ void TextureMappingMode::onMousePressed(Application * app, ofMouseEventArgs & ar _clickPosition = ofPoint(args.x, args.y); _bCropAreaDrag = true; + + int selectedTexCoordIndex = Gui::instance()->getTextureEditorWidget().getSelectedTexCoord(); + if(selectedTexCoordIndex != -1){ + app->getCmdManager()->exec(new DeselectTexCoordCmd( + &Gui::instance()->getTextureEditorWidget())); + } // TODO: emit event through the gui singleton. // TODO: create command only on mouse release.