Skip to content

Commit

Permalink
Merge branch 'develop' of sussex.cgl.ucsf.edu:/Users/pett/src/chimera…
Browse files Browse the repository at this point in the history
…x into develop
  • Loading branch information
e-pettersen committed Nov 30, 2023
2 parents f4b1f53 + db374a3 commit 9ab9c58
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 3 additions & 0 deletions src/bundles/alphafold/src/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ def _page_loaded(self, okay):
# If we don't save the timer in a variable it is deleted and never fires.

def _run(self):
from Qt import qt_object_is_deleted
if qt_object_is_deleted(self._browser):
return # User closed the window before the _run() method was called.
self._set_colab_sequence()
self._run_colab()
self.session.logger.info('Running AlphaFold prediction')
Expand Down
3 changes: 0 additions & 3 deletions src/bundles/graphics/src/drawing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1720,9 +1720,6 @@ def __init__(self, name, vertex_buffers):
self.element_buffer = None
self.instance_buffers = []

def __del__(self):
self.delete()

def delete(self):

self._masked_edges = None
Expand Down
10 changes: 6 additions & 4 deletions src/bundles/map/src/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -3383,7 +3383,8 @@ def data_cache(session):
# Open and display a map using Volume Viewer.
#
def volume_from_grid_data(grid_data, session, style = 'auto',
open_model = True, model_id = None, show_dialog = True):
open_model = True, model_id = None, show_dialog = True,
allow_reseting_color_sequence = True):
'''
Supported API.
Create a new :class:`.Volume` model from a :class:`~.data.GridData` instance and set its initial
Expand Down Expand Up @@ -3437,7 +3438,7 @@ def volume_from_grid_data(grid_data, session, style = 'auto',
v._style_when_shown = style

if grid_data.rgba is None:
if not any_volume_open(session):
if allow_reseting_color_sequence and not any_volume_open(session):
_reset_color_sequence(session)
set_initial_volume_color(v, session)

Expand Down Expand Up @@ -3634,7 +3635,6 @@ def open_grids(session, grids, name, **kw):
for g in grids:
g.initial_surface_level = level

print ('open kw', kw)
if kw.get('polar_values', False) or kw.get('difference', False):
for g in grids:
g.polar_values = True
Expand Down Expand Up @@ -3676,7 +3676,9 @@ def open_grids(session, grids, name, **kw):
vkw = {'show_dialog': False}
if hasattr(d, 'initial_style') and d.initial_style in ('surface', 'mesh', 'image'):
vkw['style'] = d.initial_style
v = volume_from_grid_data(d, session, open_model = False, **vkw)
v = volume_from_grid_data(d, session, open_model = False,
allow_reseting_color_sequence = (len(maps)==0),
**vkw)
maps.append(v)
if not show_data:
v.display = False
Expand Down

0 comments on commit 9ab9c58

Please sign in to comment.