Commit 030540b6 authored by Matthias Möller's avatar Matthias Möller
Browse files

- fix: no jointselection when inster a joint

- fix: whole skeleton becoming red if ending joint was in progress to be deleted (maybe fixed, wasn't able to reproduce this error)

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14764 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 7126502d
......@@ -330,6 +330,7 @@ void SkeletonNodeT<SkeletonType>::draw(GLState& _state, const DrawModes::DrawMod
//we will set the specular color, otherwise the color cannot be seen
ACG::Vec4f oldSpecular = _state.specular_color();
ACG::Vec4f oldDiffuse = _state.diffuse_color();
for(it = skeleton_.begin(); it != skeleton_.end(); ++it)
{
......@@ -381,6 +382,7 @@ void SkeletonNodeT<SkeletonType>::draw(GLState& _state, const DrawModes::DrawMod
}
_state.set_specular_color(oldSpecular);
_state.set_diffuse_color(oldDiffuse);
// draw the local coordinate frames
......
......@@ -1023,12 +1023,7 @@ void SkeletonEditingPlugin::insertJoint(QMouseEvent* _event)
Skeleton::Joint* joint = skeleton->joint( target_idx );
if ( joint != 0 ){
//clear selection
for (Skeleton::Iterator it=skeleton->begin(); it != skeleton->end(); ++it)
(*it)->setSelected(false);
currentJoint_ = joint->id();
joint->setSelected(true);
}
}
}
......@@ -1158,19 +1153,15 @@ void SkeletonEditingPlugin::insertJoint(QMouseEvent* _event)
currentSkeleton_ = object->id();
Skeleton::Joint* joint = skeleton->joint( target_idx );
Skeleton::Joint* joint = skeleton->joint( currentJoint_ );
if ( joint != 0 ){
if ( joint->selected() ){
//only if the joint is selected we are sure it was the same joint
//like on the mouse press
Skeleton::Joint* tmpJoint = new Skeleton::Joint(joint);
skeleton->addJoint(joint, tmpJoint);
Skeleton::Joint* tmpJoint = new Skeleton::Joint(joint);
skeleton->addJoint(joint, tmpJoint);
currentJoint_ = tmpJoint->id();
jointPreview_ = true;
}
currentJoint_ = tmpJoint->id();
jointPreview_ = true;
}
}
......@@ -1228,9 +1219,6 @@ void SkeletonEditingPlugin::insertJoint(QMouseEvent* _event)
if (skeleton == 0)
return;
for (Skeleton::Iterator it=skeleton->begin(); it != skeleton->end(); ++it)
(*it)->setSelected(false);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment