瀏覽代碼

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

Fixes #811
rdb 6 年之前
父節點
當前提交
7ca66bfe6f
共有 3 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      direct/src/tkpanels/AnimPanel.py
  2. 1 1
      direct/src/tkpanels/MopathRecorder.py
  3. 1 1
      direct/src/tkpanels/ParticlePanel.py

+ 1 - 1
direct/src/tkpanels/AnimPanel.py

@@ -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
 

+ 1 - 1
direct/src/tkpanels/MopathRecorder.py

@@ -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))

+ 1 - 1
direct/src/tkpanels/ParticlePanel.py

@@ -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))