App: fix property ordering problem when undo/redo (#3255)
* Part: fix Placement/Shape onChanged() handling * App: fix property ordering problem when undo/redo See https://tracker.freecadweb.org/view.php?id=4265#c14271 * Gui: fix undo/redo signaling Make sure to signal after all properties has been restored
This commit is contained in:
@@ -840,6 +840,12 @@ void ViewProviderPartExt::updateData(const App::Property* prop)
|
||||
{
|
||||
const char *propName = prop->getName();
|
||||
if (propName && (strcmp(propName, "Shape") == 0 || strstr(propName, "Touched") != nullptr)) {
|
||||
TopoDS_Shape cShape = Part::Feature::getShape(getObject());
|
||||
if(cachedShape.IsPartner(cShape)) {
|
||||
Gui::ViewProviderGeometryObject::updateData(prop);
|
||||
return;
|
||||
}
|
||||
|
||||
// calculate the visual only if visible
|
||||
if (isUpdateForced() || Visibility.getValue())
|
||||
updateVisual();
|
||||
@@ -918,6 +924,7 @@ void ViewProviderPartExt::updateVisual()
|
||||
haction.apply(this->nodeset);
|
||||
|
||||
TopoDS_Shape cShape = Part::Feature::getShape(getObject());
|
||||
cachedShape = cShape;
|
||||
if (cShape.IsNull()) {
|
||||
coords ->point .setNum(0);
|
||||
norm ->vector .setNum(0);
|
||||
|
||||
Reference in New Issue
Block a user