Fixed_plane_translation fix.

This commit is contained in:
Maxime Gimeno 2015-12-11 12:41:57 +01:00 committed by Sébastien Loriot
parent bffd28f19a
commit f4c7d71413
2 changed files with 7 additions and 6 deletions

View File

@ -532,9 +532,9 @@ void Scene_edit_polyhedron_item::remesh()
void Scene_edit_polyhedron_item::timerEvent(QTimerEvent* /*event*/)
{ // just handle deformation - paint like selection is handled in eventFilter()
if(state.ctrl_pressing && (state.left_button_pressing || state.right_button_pressing)) {
if(!ui_widget->ActivatePivotingCheckBox->isChecked()) {
invalidate_buffers();
deform();
if(!ui_widget->ActivatePivotingCheckBox->isChecked()) {
deform();
}
else {
Q_EMIT itemChanged(); // for redraw while Pivoting (since we close signals of manipulatedFrames while pivoting,

View File

@ -727,13 +727,14 @@ protected:
}
else
{
if(!ui_widget->ActivatePivotingCheckBox->isChecked() &&
ui_widget->ActivateFixedPlaneCheckBox->isChecked())
if( ui_widget->ActivateFixedPlaneCheckBox->isChecked())
{
// the constraint is local to the frame
rot_constraint.setTranslationConstraint(qglviewer::AxisPlaneConstraint::PLANE,qglviewer::Vec(0,0,1));
rot_constraint.setRotationConstraintType(qglviewer::AxisPlaneConstraint::FORBIDDEN);
min_it->frame->setConstraint(&rot_constraint);
if(!ui_widget->ActivatePivotingCheckBox->isChecked()){
rot_constraint.setRotationConstraintType(qglviewer::AxisPlaneConstraint::FORBIDDEN);
}
min_it->frame->setConstraint(&rot_constraint);
}
}