New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core: Create a SuppressibleExtension to provide the Suppressed property to all the WBs #12412
Conversation
210ee56
to
50aa554
Compare
@wwmayer could you please take a look? ViewProviderSuppressibleExtension::extensionUpdateData is never called. EDIT: Ok, done. I spent an hour for search and I found when I asked for help 🙄 |
d08541f
to
cec9f17
Compare
Ready for review. |
cec9f17
to
a7ecd66
Compare
Back to draft: a crash occurs at object deletion. |
a7ecd66
to
15ef32f
Compare
Got it. I was confused by
But using
|
In how far is this related to #5545? |
@wwmayer I don't think a Suppressed object aims to be a Emancipated one (cut from parents). |
15ef32f
to
59e8536
Compare
59e8536
to
735fed0
Compare
I've added a Suppress/Unsuppress action in the tree context menu. This action is only shown if the Suppressed property of the object is not hidden so the action visibility is managed at workbench level. App::SuppressibleExtension::initExtension(this);
Suppressed.setStatus(App::Property::Status::Hidden, true); //Todo: remove when TNP fixed |
Master does not build (Windows/libpack/visual studio) today. Coming from this PR.
|
namespace Gui | ||
{ | ||
|
||
class ViewProviderSuppressibleExtension : public Gui::ViewProviderExtension |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should be :
class GuiExport ViewProviderSuppressibleExtension : public ViewProviderExtension
#include "ViewProviderExtensionPython.h" | ||
|
||
|
||
namespace Gui |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The namespace should not start here. This line should be
using namespace Gui;
private: | ||
bool isSetSuppressedIcon{false}; | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace Gui
should start here. See ViewProviderGroupExtension as example
#include "ActionFunction.h" | ||
#include "Control.h" | ||
#include "Document.h" | ||
#include "PreCompiled.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"PreCompiled.h" must be the first...
Building now
Thank you @PaddleStroke for the fix. |
The CI is not using the precompiled headers. This is something that is being discussed with @adrianinsaval and @chennes if I recall correctly |
@FlachyJoe Is it still in development ? I can't find the Suppress option in Properties or in the tree context menu in Part Design.
|
@FEA-eng in PD the Suppress property is hidden (right-click, show all) until the TNP fix is merged due to the problems it can produce in shapes hierarchy. |
Many objects can be suppressed, this extension aims to provide a unique visualization in the tree view.
Fix #12361