diff --git a/.bumpversion.cfg b/.bumpversion.cfg index a2fecc7..466d846 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.1.17 +current_version = 0.1.18 commit = True tag = True diff --git a/pyproject.toml b/pyproject.toml index 24e58ac..f20d70a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "quickview" -version = "0.1.17" +version = "0.1.18" description = "An application to explore/analyze data for atmosphere component for E3SM" authors = [ {name = "Kitware Inc."}, diff --git a/quickview/__init__.py b/quickview/__init__.py index 1bb4762..36b772c 100644 --- a/quickview/__init__.py +++ b/quickview/__init__.py @@ -1,5 +1,5 @@ """QuickView: Visual Analysis for E3SM Atmosphere Data.""" -__version__ = "0.1.17" +__version__ = "0.1.18" __author__ = "Kitware Inc." __license__ = "Apache-2.0" diff --git a/quickview/view_manager.py b/quickview/view_manager.py index f81ca23..6ae9cb5 100644 --- a/quickview/view_manager.py +++ b/quickview/view_manager.py @@ -199,6 +199,20 @@ def __init__(self, source: EAMVisSource, server, state): self.registry = ViewRegistry() # Central registry for view management self.to_delete = [] + # Register state change listener for pipeline_valid + self.state.change("pipeline_valid")(self._on_pipeline_valid_change) + + def _on_pipeline_valid_change(self, pipeline_valid, **kwargs): + """Clear view registry when pipeline becomes invalid.""" + if not pipeline_valid: + # Clear all views and variables from registry + self.registry.clear() + # Clear widgets and colors tracking + del self.state.views[:] + del self.state.layout[:] + self.state.dirty("views") + self.state.dirty("layout") + def update_views_for_timestep(self): if len(self.registry) == 0: return @@ -378,11 +392,14 @@ def rebuild_visualization_layout(self, cached_layout=None): source = self.source long = state.cliplong lat = state.cliplat + tstamp = state.tstamp + time = 0.0 if len(self.state.timesteps) == 0 else self.state.timesteps[tstamp] + source.UpdateLev(self.state.midpoint, self.state.interface) source.ApplyClipping(long, lat) source.UpdateCenter(self.state.center) source.UpdateProjection(self.state.projection) - source.UpdatePipeline() + source.UpdatePipeline(time) surface_vars = source.vars.get("surface", []) midpoint_vars = source.vars.get("midpoint", []) interface_vars = source.vars.get("interface", []) diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 4f822e7..9216547 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "app" -version = "0.1.17" +version = "0.1.18" description = "QuickView: Visual Analyis for E3SM Atmosphere Data" authors = ["Kitware"] license = "" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index ad4b738..19b2ec1 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -7,7 +7,7 @@ }, "package": { "productName": "QuickView", - "version": "0.1.17" + "version": "0.1.18" }, "tauri": { "allowlist": {