Move or remove "View_Measure_Toggle_All" and "View_Measure_Clear_All"

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Move or remove "View_Measure_Toggle_All" and "View_Measure_Clear_All"

Post by vocx »

The View_Measure_Toggle_All and View_Measure_Clear_All commands are defined in the core system, in src/Gui/CommandView.cpp. They toggle on and off existing dimensions, or remove them, but don't create them.

I'm not sure these commands make sense here, since as far as I know the measuring creation commands are defined in the Part Workbench, in src/Mod/Part/Gui/Command.cpp.

So, I think it would make more sense to move the commands to the Part Module. Actually, the same commands are implemented in the Part Module, they are, Part_Measure_Toggle_All and Part_Measure_Clear_All.

So the same commands are repeated, once in the base system, and once in the Part module. The ones in the base system are launched from the "View" menu, then "Visibility", and from the context menu of the 3D view, that is, by right-clicking and choosing "Measure".

The commands defined in the Part Workbench are instead launched from the "Measure" menu, and the "Measure" toolbar that are created in this workbench.

---

The icons used by the measure functions are in the Part directory, with the exception of the repeated commands which are in the core directory src/Gui. This is also a bit inconsistent.

Code: Select all

src/Gui/Icons/

Part_Measure_Clear_All.svg
Part_Measure_Toggle_All.svg

Code: Select all

src/Mod/Part/Gui/Resources/icons/

Part_Measure_Angular.svg
Part_Measure_Linear.svg
Part_Measure_Refresh.svg
Part_Measure_Step_Active.svg
Part_Measure_Step_Done.svg
Part_Measure_Toggle_3d.svg
Part_Measure_Toggle_Delta.svg 
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Move or remove "View_Measure_Toggle_All" and "View_Measure_Clear_All"

Post by uwestoehr »

vocx wrote: Mon Oct 12, 2020 2:45 am So, I think it would make more sense to move the commands to the Part Module.
:+1:

Would you make a PR that does this?
Post Reply