jaredsampson / pymolprobity

A MolProbity-style visualization plugin for PyMOL
MIT License
11 stars 3 forks source link

geometry manager problem when no objects loaded #4

Closed speleo3 closed 7 years ago

speleo3 commented 7 years ago

With "Plugin > PyMOLProbity" and no objects loaded into PyMOL, I either get a traceback, or the external GUI hangs (depends on PyMOL version). This is fixed by replacing w.grid by w.pack:

diff --git a/pymolprobity/gui.py b/pymolprobity/gui.py
index 0fd0549..a007295 100644
--- a/pymolprobity/gui.py
+++ b/pymolprobity/gui.py
@@ -257,7 +260,7 @@ class PyMOLProbity:
             # Stop if there are no available objects.
             if len(obj_list) == 0:
                 w = tk.Label(parent, text='No objects loaded!')
-                w.grid(sticky='ew')
+                w.pack()
                 return None

             # Create a frame container