[TD]Fix group item moving when locked
This commit is contained in:
committed by
WandererFan
parent
b96a650dec
commit
00c8916341
@@ -129,9 +129,9 @@ bool DrawProjGroupItem::showLock(void) const
|
||||
App::DocumentObjectExecReturn *DrawProjGroupItem::execute(void)
|
||||
{
|
||||
// Base::Console().Message("DPGI::execute(%s)\n",Label.getValue());
|
||||
if (!keepUpdated()) {
|
||||
return App::DocumentObject::StdReturn;
|
||||
}
|
||||
if (!keepUpdated()) {
|
||||
return App::DocumentObject::StdReturn;
|
||||
}
|
||||
|
||||
bool haveX = checkXDirection();
|
||||
if (!haveX) {
|
||||
@@ -155,17 +155,18 @@ App::DocumentObjectExecReturn *DrawProjGroupItem::execute(void)
|
||||
void DrawProjGroupItem::autoPosition()
|
||||
{
|
||||
// Base::Console().Message("DPGI::autoPosition(%s)\n",Label.getValue());
|
||||
if (LockPosition.getValue()) {
|
||||
return;
|
||||
}
|
||||
auto pgroup = getPGroup();
|
||||
Base::Vector3d newPos;
|
||||
if (pgroup != nullptr) {
|
||||
if (pgroup->AutoDistribute.getValue()) {
|
||||
if (!LockPosition.getValue()) {
|
||||
newPos = pgroup->getXYPosition(Type.getValueAsString());
|
||||
X.setValue(newPos.x);
|
||||
Y.setValue(newPos.y);
|
||||
requestPaint();
|
||||
purgeTouched(); //prevents "still touched after recompute" message
|
||||
}
|
||||
newPos = pgroup->getXYPosition(Type.getValueAsString());
|
||||
X.setValue(newPos.x);
|
||||
Y.setValue(newPos.y);
|
||||
requestPaint();
|
||||
purgeTouched(); //prevents "still touched after recompute" message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user