View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001869 | Draft | Feature | public | 2014-12-21 13:44 | 2015-01-12 18:59 |
Reporter | r-frank | Assigned To | wmayer | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | Windows | OS Version | 7 |
Product Version | 0.14 | ||||
Summary | 0001869: Clones displayed in wrong view mode | ||||
Description | When cloning a part in Draft Workbench the clone is displayed in "As is"-Mode while your Part is displayed in for example wireframe Mode. | ||||
Steps To Reproduce | Say you create a part consisting of added/cutted Solids in Part Module Workbench. You change to Wireframe-View-Mode. You change to Draft-Workbench. You make a clone of your part. The clone is displayed in "As is"-Mode while your Part is displayed in wireframe Mode. | ||||
Additional Information | Verified with Daily PPA (0.15) in Linuix Mint. | ||||
Tags | No tags attached. | ||||
FreeCAD Information | |||||
|
Hm this is more complicated than I thought, it affect all Python features: None of the python features created in a specific override mode are getting that specific mode. The python features that exist in the document when the override mode is changed are correctly handled, but not those that are created after the mode change. The problem is apparently that at the moment the ViewProvider::setOverrideMode() function is run, python features still don't have their display mode list complete, and therefore setOverride() exits without finding a corresponding display mode. I'm not sure how this can be solved... |
|
Can you have a look again? To me this seems like it's fixed now. |
|
It's still happening for me... Can you check this workflow? 1. Create a Draft rectangle (make sure Preferences->Draft->"Fill objects with faces when possible" is checked, so the rectangle has a face) 2. Switch from "as-is" to "wireframe" override 3. Create another Draft rectangle The second rectangle still shows the face. As far as I tested this happens with all python features, not only Draft. I added a few std::cout in Gui::ViewProvider::setOverrideMode(), and it is correctly called, but it doesn't find the corresponding display mode in the object, so it simply bails out. |
|
Now I see what you mean. I thought it's about copying the "DisplayMode" property of the view provider. OK, I can confirm the issue. |
|
The same with solid models (That's what i meant with my opening post). - go to Part Design workbench - create new document - create sketch on XZ-Plane - sketch a rectangle in first quadrant (i.e. upper right are, all coordinates should have positive values) - do revolution around horizontal axis - switch to wireframe mode - switch to draft workbench - mark revolution in tree view - do "clone" Thanks for looking into this |
|
The point is when setOverrideMode is called the display modes of a custom view provider is empty and thus the call has no effect. Afterwards the Python view provider is set as proxy to the C++ view provider. |
|
The problem is that it will be complicated for freecad to know when a proxy has been added, since it depends on the user... Maybe the easiest solution would be for the python view providers to run the setOverride function manually? For example in their init function... |
|
Ah Werner you are way too fast :) |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-12-21 13:44 | r-frank | New Issue | |
2014-12-22 13:58 | yorik | Assigned To | => yorik |
2014-12-22 13:58 | yorik | Status | new => assigned |
2014-12-29 20:30 | yorik | Note Added: 0005467 | |
2015-01-02 18:26 | normandc | Project | FreeCAD => Draft |
2015-01-07 15:40 | yorik | Note Edited: 0005467 | |
2015-01-12 13:21 | wmayer | Note Added: 0005633 | |
2015-01-12 16:01 | yorik | Note Added: 0005636 | |
2015-01-12 16:56 | wmayer | Note Added: 0005637 | |
2015-01-12 17:36 | r-frank | Note Added: 0005638 | |
2015-01-12 18:36 | wmayer | Note Added: 0005639 | |
2015-01-12 18:40 | yorik | Note Added: 0005640 | |
2015-01-12 18:41 | yorik | Note Added: 0005641 | |
2015-01-12 18:41 | yorik | Note Edited: 0005641 | |
2015-01-12 18:59 | wmayer | Changeset attached | => FreeCAD Master master bdfaaee8 |
2015-01-12 18:59 | wmayer | Assigned To | yorik => wmayer |
2015-01-12 18:59 | wmayer | Status | assigned => closed |
2015-01-12 18:59 | wmayer | Resolution | open => fixed |