ofxPiMapper fixed for C++17 & oF 12.0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

35 lines
720 B

#include "DeselectTexCoordCmd.h"
namespace ofx {
namespace piMapper {
DeselectTexCoordCmd::DeselectTexCoordCmd(TextureEditorWidget * te){
_textureEditor = te;
}
void DeselectTexCoordCmd::exec(){
ofLogNotice("DeselectTexCoordCmd", "exec");
_selectedTexCoord = -1;
vector <CircleJoint *> joints = _textureEditor->getJoints();
for(unsigned int i = 0; i < joints.size(); ++i){
if(joints[i]->isSelected()){
_selectedTexCoord = i;
}
}
_textureEditor->unselectAllJoints();
}
void DeselectTexCoordCmd::undo(){
ofLogNotice("DeselectTexCoordCmd", "undo");
if(_selectedTexCoord == -1){
return;
}
_textureEditor->getJoints()[_selectedTexCoord]->select();
}
} // namespace piMapper
} // namespace ofx