Skip to content

Commit

Permalink
PD: Fix default display mode of ViewProviderBoolean
Browse files Browse the repository at this point in the history
Make sure that by default display mode is set to 'Flat Lines' instead of 'Group' as otherwise it won't show the result object
  • Loading branch information
wwmayer committed Nov 5, 2024
1 parent 4c50f29 commit 82f95ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Mod/PartDesign/Gui/ViewProviderBoolean.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions src/Mod/PartDesign/Gui/ViewProviderBoolean.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class PartDesignGuiExport ViewProviderBoolean : public ViewProvider,

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:
Expand Down

0 comments on commit 82f95ba

Please sign in to comment.