diff --git a/src/Mod/Part/Gui/ViewProviderExt.cpp b/src/Mod/Part/Gui/ViewProviderExt.cpp
index daf355e909..64f92b99e9 100644
--- a/src/Mod/Part/Gui/ViewProviderExt.cpp
+++ b/src/Mod/Part/Gui/ViewProviderExt.cpp
@@ -104,6 +104,7 @@
#include
#include
#include
+#include
#include
#include
@@ -396,6 +397,12 @@ void ViewProviderPartExt::onChanged(const App::Property* prop)
// if the object was invisible and has been changed, recreate the visual
if (prop == &Visibility && (isUpdateForced() || Visibility.getValue()) && VisualTouched) {
updateVisual();
+ // updateVisual() may not be triggered by any change (e.g.
+ // triggered by an external object through forceUpdate()). And
+ // since DiffuseColor is not changed here either, do not falsly set
+ // the document modified status
+ Base::ObjectStatusLocker guard(
+ App::Property::NoModify, &DiffuseColor);
// The material has to be checked again (#0001736)
onChanged(&DiffuseColor);
}
@@ -1292,8 +1299,8 @@ void ViewProviderPartExt::updateVisual()
void ViewProviderPartExt::forceUpdate(bool enable) {
if(enable) {
if(++forceUpdateCount == 1) {
- if(!isShow())
- Visibility.touch();
+ if(!isShow() && VisualTouched)
+ updateVisual();
}
}else if(forceUpdateCount)
--forceUpdateCount;