Sketcher: [skip ci] fix undo bug when directly changing a datum constraint in the property editor
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <memory>
|
||||
# include <QDebug>
|
||||
# include <QTextStream>
|
||||
#endif
|
||||
@@ -337,8 +338,9 @@ bool PropertyConstraintListItem::event (QEvent* ev)
|
||||
double datum = quant.getValue();
|
||||
if ((*it)->Type == Sketcher::Angle)
|
||||
datum = Base::toRadians<double>(datum);
|
||||
const_cast<Sketcher::Constraint *>((*it))->setValue(datum);
|
||||
item->set1Value(id,(*it));
|
||||
std::unique_ptr<Sketcher::Constraint> copy((*it)->clone());
|
||||
copy->setValue(datum);
|
||||
item->set1Value(id, copy.get());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user