[yt-svn] commit/yt: chummels: Merged in ngoldbaum/yt (pull request #1698)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Aug 20 09:52:06 PDT 2015
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/37669d402f18/
Changeset: 37669d402f18
Branch: yt
User: chummels
Date: 2015-08-20 16:51:52+00:00
Summary: Merged in ngoldbaum/yt (pull request #1698)
Ensure the FRB is valid before executing _setup_plots.
Affected #: 2 files
diff -r 4bfdb0ddccdb3bad26724484a89149b5a7ecfe51 -r 37669d402f187cc7b51d3f6043f2e23dd80eb8be yt/visualization/plot_container.py
--- a/yt/visualization/plot_container.py
+++ b/yt/visualization/plot_container.py
@@ -71,9 +71,9 @@
if not args[0]._data_valid:
args[0]._recreate_frb()
if not args[0]._plot_valid:
+ # it is the responsibility of _setup_plots to call
+ # args[0].run_callbacks()
args[0]._setup_plots()
- if hasattr(args[0], 'run_callbacks'):
- args[0].run_callbacks()
rv = f(*args, **kwargs)
return rv
return newfunc
@@ -81,7 +81,6 @@
def apply_callback(f):
@wraps(f)
def newfunc(*args, **kwargs):
- #rv = f(*args[1:], **kwargs)
args[0]._callbacks.append((f.__name__, (args, kwargs)))
return args[0]
return newfunc
diff -r 4bfdb0ddccdb3bad26724484a89149b5a7ecfe51 -r 37669d402f187cc7b51d3f6043f2e23dd80eb8be yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -729,7 +729,11 @@
return xc, yc
def _setup_plots(self):
- if self._plot_valid: return
+ if self._plot_valid:
+ return
+ if not self._data_valid:
+ self._recreate_frb()
+ self._data_valid = True
self._colorbar_valid = True
for f in list(set(self.data_source._determine_fields(self.fields))):
axis_index = self.data_source.axis
@@ -971,7 +975,7 @@
self.plots[f]._toggle_colorbar(draw_colorbar)
self._set_font_properties()
-
+ self.run_callbacks()
self._plot_valid = True
def setup_callbacks(self):
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list