DeepSOIC / Part-o-magic

Experiment on FreeCAD-wide automation of Part container management. For FC v0.17-0.18
Other
12 stars 4 forks source link

FIX for Missing icons #50 #54

Closed allanlaal closed 3 years ago

allanlaal commented 3 years ago

FIX for Missing icons #50 #54

DeepSOIC commented 3 years ago

i have no idea if this fixes the issue, and if it does then why so. But since i can't reproduce the issue, i just merge.

DeepSOIC commented 3 years ago

can you give me some clue for how did you figure it out?

DeepSOIC commented 3 years ago

I'm afraid i have to revert it for now. I just found out that this fix causes observer control buttons to lose icons instead. image

OS: Windows 10 (10.0) Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.19.23546 (Git) Build type: Release Branch: master Hash: 6b017f9a16b15b0e628c8d874c4058442dee5548 Python version: 3.6.8 Qt version: 5.12.1 Coin version: 4.0.0a OCC version: 7.3.0 Locale: English/United States (en_US)

allanlaal commented 3 years ago

seems that the path needs to be absolute afterall, I've seen how other worksbenches use FreeCAD.Path to get the true local FreeCAD mods path

allanlaal commented 3 years ago

seems that the path needs to be absolute afterall, I've seen how other worksbenches use FreeCAD.Path to get the true local FreeCAD mods path

DeepSOIC commented 3 years ago

these are not file paths, they are qt resource paths. The icons are first compiled as resource strings into Part-o-magic/PartOMagic/Gui/Icons/Icons.py, which is then imported, which is done at initialization of the workbench.

The icons that are missing in the original issue are borrowed from Sketcher workbench, they should get loaded with import SketcherGui statement found in the command code modules.

I don't know all the intricacies of qt resource stuff... particularly, i have no idea what your suggested path change does in this virtual file system.