[Core] Add visibility toggling to ViewProvider

With this extension of the API, view providers can indicate whether
document objects should be able to be toggled for visibility.  There is
both a C++ and Python interface, idiomatic for FreeCAD code.
This commit is contained in:
Pieter Hijma
2025-04-05 13:47:00 +02:00
parent 62b0e6eb4f
commit 0d5481e448
6 changed files with 78 additions and 2 deletions

View File

@@ -93,6 +93,7 @@ PROPERTY_SOURCE_ABSTRACT(Gui::ViewProvider, App::TransactionalObject)
ViewProvider::ViewProvider()
: overrideMode("As Is")
, toggleVisibilityMode(ToggleVisibilityMode::CanToggleVisibility)
{
setStatus(UpdateData, true);