Skip to content
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

Draft: re-organization of the trackers code #3092

Merged
merged 4 commits into from Mar 23, 2020

Conversation

vocx-fc
Copy link
Contributor

@vocx-fc vocx-fc commented Feb 21, 2020

Various tasks regarding the tracker commands.

  • The tracker module is moved to another module, gui_trackers.
  • The tracker module is properly imported in DraftTools.py, and we avoid star imports.
  • The trackers are used fully qualified with the name of the module, for example, trackers.PlaneTracker().
  • The imports are changed accordingly in the modules that use trackers: the Snapper, DraftFillet, and DraftEdit.
  • We update the unit tests, so that they pass.

This pull request needs to be merged after #3091 is merged so that the new files are correctly included in the variables in CMakeLists.txt. When this happens, this request will create a conflict, so this pull request will have to be rebased onto the master branch, and then it will be able to be merged.

Forum thread: [Discussion] Splitting Draft tools into their own modules.

The BIM Workbench needs to be changed as well to support the new tracker module, and then it can be used normally.

import draftguitools.gui_trackers as DraftTrackers

See yorikvanhavre/BIM_Workbench#38


  • Branch rebased on latest master git pull --rebase upstream master
  • Unit tests confirmed to pass by running ./bin/FreeCAD --run-test 0
  • Commit message is well-written
  • Commit message includes issue #<id> or fixes #<id> where <id> is the associated MantisBT issue id if one exists

@yorikvanhavre
Copy link
Member

needs conflict solving

Properly import the tracker classes. Avoid star imports,
and use the classes prefixed with the name of the module.
The BIM Workbench also has to be updated to use the new
module.
```
import draftguitools.gui_trackers as DraftTrackers
```
Also change the imports in `DraftFillet.py`
and `DraftEdit.py` so the trackers are found.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants