PD: Fix default display mode of ViewProviderBoolean

Make sure that by default display mode is set to 'Flat Lines' instead of 'Group' as otherwise it won't show the result object
This commit is contained in:
wmayer
2024-11-05 21:44:32 +01:00
committed by Chris Hennes
parent 569cd8f9b7
commit 6b490fc8af
2 changed files with 7 additions and 3 deletions

View File

@@ -120,11 +120,14 @@ bool ViewProviderBoolean::onDelete(const std::vector<std::string> &s)
return ViewProvider::onDelete(s);
}
void ViewProviderBoolean::attach(App::DocumentObject* obj) {
void ViewProviderBoolean::attach(App::DocumentObject* obj)
{
PartGui::ViewProviderPartExt::attach(obj);
}
//set default display mode to override the "Group" display mode
setDisplayMode("Flat Lines");
const char* ViewProviderBoolean::getDefaultDisplayMode() const
{
return "Flat Lines";
}
void ViewProviderBoolean::onChanged(const App::Property* prop) {

View File

@@ -49,6 +49,7 @@ public:
bool onDelete(const std::vector<std::string> &) override;
void attach(App::DocumentObject*) override;
const char* getDefaultDisplayMode() const override;
void onChanged(const App::Property* prop) override;
protected: