Skip to content

Commit

Permalink
Merge pull request #509 from ISISNeutronMuon/maciej/last-fixes-before…
Browse files Browse the repository at this point in the history
…-release

Correct path saving mechanism for actions
  • Loading branch information
ChiCheng45 authored Jul 22, 2024
2 parents 7059d91 + e3299a9 commit c5a5c40
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions MDANSE_GUI/Src/MDANSE_GUI/InputWidgets/InputFileWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ def valueFromDialog(self):
if new_value[0]:
self._field.setText(new_value[0])
self.updateValue()
try:
print(
f"Settings path of {self._job_name} to {os.path.split(new_value[0])[0]}"
)
paths_group.set(self._job_name, os.path.split(new_value[0])[0])
except:
LOG.error(
f"session.set_path failed for {self._job_name}, {os.path.split(new_value[0])[0]}"
)
try:
LOG.info(
f"Settings path of {self._job_name} to {os.path.split(new_value[0])[0]}"
)
paths_group.set(self._job_name, os.path.split(new_value[0])[0])
except:
LOG.error(
f"session.set_path failed for {self._job_name}, {os.path.split(new_value[0])[0]}"
)

def get_widget_value(self):
"""Collect the results from the input widgets and return the value."""
Expand Down
4 changes: 2 additions & 2 deletions MDANSE_GUI/Src/MDANSE_GUI/Tabs/Visualisers/PlotSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def make_layout(self, width=12.0, height=9.0, dpi=100):
try:
current_cmap = colour_group.get("colormap")
except KeyError:
print(f"Could not get colormap from colours")
LOG.warning(f"Could not get colormap from colours")
colour_group.add(
"colormap",
"viridis",
Expand All @@ -195,7 +195,7 @@ def make_layout(self, width=12.0, height=9.0, dpi=100):
if current_cmap not in mpl.colormaps():
current_cmap = "viridis"
except:
print(f"Could not get the colours group")
LOG.warning(f"Could not get the colours group")
current_cmap = "viridis"
cmap_selector = QComboBox(self)
cmap_selector.addItems(mpl.colormaps())
Expand Down
2 changes: 1 addition & 1 deletion MDANSE_GUI/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencies = [
"matplotlib",
"qtpy",
"vtk",
"PyQt6",
"PyQt6<=6.7.0",
"PyYAML",
"tomlkit"
]
Expand Down

0 comments on commit c5a5c40

Please sign in to comment.