Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix refresh #63

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ environment:

install:
# windows config (for installation)
- cmd: "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- cmd: "%PYTHON%\\Scripts\\activate.bat%"
- cmd: setlocal
- cmd: set ANACONDA_API_TOKEN=
# conda config
Expand Down
1 change: 1 addition & 0 deletions ci/conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ test:
- seaborn
- pillow
- psy-maps
- pyqtwebengine
source_files:
- tests

Expand Down
2 changes: 1 addition & 1 deletion psy_view/ds_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,7 @@ def refresh(self, reset_combo: bool = True) -> None:

if self.sp:
data = self.data
ds_data = self.ds[self.variable]
ds_data = self.ds.psy[self.variable]

with self.silence_variable_buttons():
self.variable_buttons[self.variable].setChecked(True)
Expand Down
12 changes: 12 additions & 0 deletions psy_view/plotmethods.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@

import xarray as xr
from psyplot.utils import unique_everseen
import psyplot.data as psyd

from PyQt5 import QtWidgets, QtCore, QtGui
import psy_view.dialogs as dialogs
Expand Down Expand Up @@ -401,6 +402,17 @@ class MapPlotWidget(PlotMethodWidget):

plotmethod = 'mapplot'

@property
def sp(self) -> Optional[Project]:
sp = super().sp
if sp:
arrays: List[str] = [
data.psy.arr_name for data in sp
if not isinstance(data, psyd.InteractiveList)
]
return sp(arr_name=arrays)
return sp

def get_rows(self, func: Callable) -> List[List[GridCell]]:
"""Get the rows of the formatoption widgets.

Expand Down