From 16489777d216d38a79fd2c7e9444cd9ac7a8c14c Mon Sep 17 00:00:00 2001 From: Russell Johnson <47639332+Russ4262@users.noreply.github.com> Date: Mon, 5 Jul 2021 14:45:36 -0500 Subject: [PATCH] Path: Add debug comments and comment out unused code --- src/Mod/Path/PathScripts/PathToolBit.py | 4 ++++ src/Mod/Path/PathScripts/PathToolBitLibraryGui.py | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Mod/Path/PathScripts/PathToolBit.py b/src/Mod/Path/PathScripts/PathToolBit.py index c87d4cd6a2..6d6032abfd 100644 --- a/src/Mod/Path/PathScripts/PathToolBit.py +++ b/src/Mod/Path/PathScripts/PathToolBit.py @@ -96,6 +96,7 @@ def findToolBit(name, path=None): return _findToolFile("{}.fctb".format(name), path, 'Bit') +# Only used in ToolBit unit test module: TestPathToolBit.py def findToolLibrary(name, path=None): '''findToolLibrary(name, path) ... search for name, if relative path look in path''' PathLog.track(name, path) @@ -117,12 +118,15 @@ def _findRelativePath(path, typ): return relative +# Unused due to bug fix related to relative paths +""" def findRelativePathShape(path): return _findRelativePath(path, 'Shape') def findRelativePathTool(path): return _findRelativePath(path, 'Bit') +""" def findRelativePathLibrary(path): diff --git a/src/Mod/Path/PathScripts/PathToolBitLibraryGui.py b/src/Mod/Path/PathScripts/PathToolBitLibraryGui.py index 750c2eeb38..693d954c0c 100644 --- a/src/Mod/Path/PathScripts/PathToolBitLibraryGui.py +++ b/src/Mod/Path/PathScripts/PathToolBitLibraryGui.py @@ -464,6 +464,7 @@ class ToolBitLibrary(object): if shapefile is None: # user canceled return + # select the bit file location and filename filename = PathToolBitGui.GetNewToolFile() if filename is None: return @@ -472,7 +473,7 @@ class ToolBitLibrary(object): loc, fil = os.path.split(filename) fname = os.path.splitext(fil)[0] fullpath = "{}{}{}.fctb".format(loc, os.path.sep, fname) - PathLog.debug(fullpath) + PathLog.debug("fullpath: {}".format(fullpath)) self.temptool = PathToolBit.ToolBitFactory().Create(name=fname) self.temptool.BitShape = shapefile @@ -577,6 +578,7 @@ class ToolBitLibrary(object): self.form.librarySave.setEnabled(True) def toolEdit(self, selected): + PathLog.track() item = self.toolModel.item(selected.row(), 0) if self.temptool is not None: