make initial path defaults slightly more intuitive

This commit is contained in:
sliptonic
2021-01-20 16:24:31 -06:00
committed by Markus Lampert
parent c8d3210ba4
commit f26e631ab6
3 changed files with 7 additions and 1 deletions

View File

@@ -246,15 +246,19 @@ def setDefaultTaskPanelLayout(style):
def experimentalFeaturesEnabled():
return preferences().GetBool(EnableExperimentalFeatures, False)
def suppressAllSpeedsWarning():
return preferences().GetBool(WarningSuppressAllSpeeds, True)
def suppressRapidSpeedsWarning():
return suppressAllSpeedsWarning() or preferences().GetBool(WarningSuppressRapidSpeeds, True)
def suppressSelectionModeWarning():
return preferences().GetBool(WarningSuppressSelectionMode, True)
def suppressOpenCamLibWarning():
return preferences().GetBool(WarningSuppressOpenCamLib, True)

View File

@@ -247,7 +247,8 @@ def GetToolShapeFile(parent=None):
location, '*.fcstd')
if fname and fname[0]:
if fname != location:
PathPreferences.setLastPathToolShape(location)
newloc = os.path.dirname(fname[0])
PathPreferences.setLastPathToolShape(newloc)
return fname[0]
else:
return None

View File

@@ -82,6 +82,7 @@ def checkWorkingDir():
workingdir = workingdir[:-8] # trim off trailing /Library if user chose it
PathPreferences.setLastPathToolLibrary("{}{}Library".format(workingdir, os.path.sep))
PathPreferences.setLastPathToolBit("{}{}Bit".format(workingdir, os.path.sep))
PathLog.debug('setting workingdir to: {}'.format(workingdir))
subdirlist = ['Bit', 'Library', 'Shape']