tkpanels: work around tkinter bug cancelling file open dialog on macOS

Fixes #811
This commit is contained in:
rdb 2020-01-02 01:06:03 +01:00
parent 2b9cc61d04
commit 7ca66bfe6f
3 changed files with 3 additions and 3 deletions

View File

@ -276,7 +276,7 @@ class AnimPanel(AppShell):
title = 'Load Animation',
parent = self.component('hull')
)
if not animFilename:
if not animFilename and animFilename != 'None':
# no file selected, canceled
return

View File

@ -1638,7 +1638,7 @@ class MopathRecorder(AppShell, DirectObject):
initialdir = path,
title = 'Load Nurbs Curve',
parent = self.parent)
if mopathFilename:
if mopathFilename and mopathFilename != 'None':
self.reset()
nodePath = loader.loadModel(
Filename.fromOsSpecific(mopathFilename))

View File

@ -1272,7 +1272,7 @@ class ParticlePanel(AppShell):
initialdir = path,
title = 'Load Particle Effect',
parent = self.parent)
if particleFilename:
if particleFilename and particleFilename != 'None':
# Delete existing particles and forces
self.particleEffect.loadConfig(
Filename.fromOsSpecific(particleFilename))