wandererfan wrote: ↑Sun Jan 26, 2020 6:05 pm
Ahh, you've run into the great FC divide between App and Gui! Gui is allowed to call App, but App is not allowed to call Gui.
OK. The idea was only to add the properties LineWidth etc. if the parameter ShowFrame is set.
So if it is possible to evaluate ShowFrame in ViewProviderRichAnno.cpp then my idea can work, otherwise i don't see a ways to implement a conditional hiding of the line parameters when there is no frame.
uwestoehr wrote: ↑Sun Jan 26, 2020 9:57 pm
I don't know about the internals. What i did was just what i see for other TD components and they do a QGIView updateView(true).
Usually Qt figures out all the repainting for you. In this case it was not, so we need to force it with the update() call.
uwestoehr wrote: ↑Sun Jan 26, 2020 10:01 pm
OK. The idea was only to add the properties LineWidth etc. if the parameter ShowFrame is set.
So if it is possible to evaluate ShowFrame in ViewProviderRichAnno.cpp then my idea can work, otherwise i don't see a ways to implement a conditional hiding of the line parameters when there is no frame.
uwestoehr wrote: ↑Sun Jan 26, 2020 10:01 pm
OK. The idea was only to add the properties LineWidth etc. if the parameter ShowFrame is set.
So if it is possible to evaluate ShowFrame in ViewProviderRichAnno.cpp then my idea can work, otherwise i don't see a ways to implement a conditional hiding of the line parameters when there is no frame.
if (getViewObject()->ShowFrame.getValue()) {
LineWidth.setStatus(App::Property::ReadOnly,true); //or
Thank you. I tried this but chose the wrong position directly after the addition of the parameters.
In this PR: https://github.com/FreeCAD/FreeCAD/pull/2956
it works now as it should: only enabled if there is a frame.