mirror of https://gitlab.com/pamhyr/pamhyr2
Fix pep8
parent
318f6a4668
commit
b0e0dc75f1
|
|
@ -374,7 +374,8 @@ class Mage(CommandLineSolver):
|
||||||
files = files + self._export_BC(
|
files = files + self._export_BC(
|
||||||
study, "LIM", LIM, repertory, qlog, name=name
|
study, "LIM", LIM, repertory, qlog, name=name
|
||||||
)
|
)
|
||||||
files = files + self._export_QSO(study, QSO, repertory, qlog, name=name)
|
files = files + self._export_QSO(study, QSO, repertory,
|
||||||
|
qlog, name=name)
|
||||||
|
|
||||||
return files
|
return files
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,7 @@ class PlotAC(PamhyrPlot):
|
||||||
self.next_plot_selected.set_data([], [])
|
self.next_plot_selected.set_data([], [])
|
||||||
|
|
||||||
if (0 <= previous_id < self.data.number_profiles
|
if (0 <= previous_id < self.data.number_profiles
|
||||||
and not self._parent.tableView.isRowHidden(previous_id)):
|
and not self._parent.tableView.isRowHidden(previous_id)):
|
||||||
self.previous_plot_selected.set_data(
|
self.previous_plot_selected.set_data(
|
||||||
self.data.profile(previous_id).get_station(),
|
self.data.profile(previous_id).get_station(),
|
||||||
self.data.profile(previous_id).z()
|
self.data.profile(previous_id).z()
|
||||||
|
|
@ -201,7 +201,7 @@ class PlotAC(PamhyrPlot):
|
||||||
self.previous_plot_selected.set_visible(True)
|
self.previous_plot_selected.set_visible(True)
|
||||||
|
|
||||||
if (0 <= profile_id < self.data.number_profiles
|
if (0 <= profile_id < self.data.number_profiles
|
||||||
and not self._parent.tableView.isRowHidden(profile_id)):
|
and not self._parent.tableView.isRowHidden(profile_id)):
|
||||||
self.plot_selected.set_data(
|
self.plot_selected.set_data(
|
||||||
self.data.profile(profile_id).get_station(),
|
self.data.profile(profile_id).get_station(),
|
||||||
self.data.profile(profile_id).z()
|
self.data.profile(profile_id).z()
|
||||||
|
|
@ -209,7 +209,7 @@ class PlotAC(PamhyrPlot):
|
||||||
self.plot_selected.set_visible(True)
|
self.plot_selected.set_visible(True)
|
||||||
|
|
||||||
if (0 <= next_id < self.data.number_profiles
|
if (0 <= next_id < self.data.number_profiles
|
||||||
and not self._parent.tableView.isRowHidden(next_id)):
|
and not self._parent.tableView.isRowHidden(next_id)):
|
||||||
self.next_plot_selected.set_data(
|
self.next_plot_selected.set_data(
|
||||||
self.data.profile(next_id).get_station(),
|
self.data.profile(next_id).get_station(),
|
||||||
self.data.profile(next_id).z()
|
self.data.profile(next_id).z()
|
||||||
|
|
|
||||||
|
|
@ -206,9 +206,12 @@ class GeometryWindow(PamhyrWindow):
|
||||||
self.find(QCheckBox, "checkBox_show_interpolated").toggled.connect(
|
self.find(QCheckBox, "checkBox_show_interpolated").toggled.connect(
|
||||||
self.update_redraw
|
self.update_redraw
|
||||||
)
|
)
|
||||||
self._table.modelReset.connect(self.update_interpolated_profiles_visibility)
|
self._table.modelReset.connect(
|
||||||
self._table.rowsInserted.connect(self.update_interpolated_profiles_visibility)
|
self.update_interpolated_profiles_visibility)
|
||||||
self._table.rowsRemoved.connect(self.update_interpolated_profiles_visibility)
|
self._table.rowsInserted.connect(
|
||||||
|
self.update_interpolated_profiles_visibility)
|
||||||
|
self._table.rowsRemoved.connect(
|
||||||
|
self.update_interpolated_profiles_visibility)
|
||||||
if self._study.is_read_only():
|
if self._study.is_read_only():
|
||||||
actions = {
|
actions = {
|
||||||
"action_export": self.export_to_file,
|
"action_export": self.export_to_file,
|
||||||
|
|
@ -255,7 +258,8 @@ class GeometryWindow(PamhyrWindow):
|
||||||
).isChecked()
|
).isChecked()
|
||||||
selection = self.tableView.selectionModel()
|
selection = self.tableView.selectionModel()
|
||||||
for row in range(self._table.rowCount()):
|
for row in range(self._table.rowCount()):
|
||||||
hidden = not show_interpolated and self._reach.profile(row).interpolated
|
hidden = not show_interpolated \
|
||||||
|
and self._reach.profile(row).interpolated
|
||||||
self.tableView.setRowHidden(row, hidden)
|
self.tableView.setRowHidden(row, hidden)
|
||||||
if hidden:
|
if hidden:
|
||||||
selection.select(
|
selection.select(
|
||||||
|
|
@ -263,7 +267,8 @@ class GeometryWindow(PamhyrWindow):
|
||||||
QItemSelectionModel.Deselect | QItemSelectionModel.Rows
|
QItemSelectionModel.Deselect | QItemSelectionModel.Rows
|
||||||
)
|
)
|
||||||
if selection.currentIndex().row() == row:
|
if selection.currentIndex().row() == row:
|
||||||
selection.setCurrentIndex(QModelIndex(), QItemSelectionModel.NoUpdate)
|
selection.setCurrentIndex(QModelIndex(),
|
||||||
|
QItemSelectionModel.NoUpdate)
|
||||||
|
|
||||||
def update_redraw(self):
|
def update_redraw(self):
|
||||||
self._update(redraw=True)
|
self._update(redraw=True)
|
||||||
|
|
|
||||||
|
|
@ -919,7 +919,8 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||||
##################
|
##################
|
||||||
|
|
||||||
def ensure_current_reach(self):
|
def ensure_current_reach(self):
|
||||||
"""Offer a reach selection when needed; return False on cancellation."""
|
"""Offer a reach selection when needed;
|
||||||
|
return False on cancellation."""
|
||||||
if self._study is None:
|
if self._study is None:
|
||||||
return False
|
return False
|
||||||
river = self._study.river
|
river = self._study.river
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,8 @@ class SelectProfileDialog(PamhyrDialog):
|
||||||
for index in range(len(self._profiles)):
|
for index in range(len(self._profiles)):
|
||||||
if index not in self._selectable_indices:
|
if index not in self._selectable_indices:
|
||||||
item = combobox.model().item(index)
|
item = combobox.model().item(index)
|
||||||
item.setFlags(item.flags() & ~(Qt.ItemIsEnabled | Qt.ItemIsSelectable))
|
item.setFlags(item.flags() &
|
||||||
|
~(Qt.ItemIsEnabled | Qt.ItemIsSelectable))
|
||||||
|
|
||||||
combobox.setCurrentIndex(
|
combobox.setCurrentIndex(
|
||||||
self._selectable_indices[0] if self._selectable_indices else -1
|
self._selectable_indices[0] if self._selectable_indices else -1
|
||||||
|
|
|
||||||
|
|
@ -210,7 +210,8 @@ class MainTranslate(UnitTranslate):
|
||||||
"MainWindow", "Warning"
|
"MainWindow", "Warning"
|
||||||
)
|
)
|
||||||
self._dict["no_reach"] = _translate(
|
self._dict["no_reach"] = _translate(
|
||||||
"MainWindow", "Create a reach in the network before opening this window."
|
"MainWindow",
|
||||||
|
"Create a reach in the network before opening this window."
|
||||||
)
|
)
|
||||||
|
|
||||||
self._dict["mb_last_open_title"] = _translate(
|
self._dict["mb_last_open_title"] = _translate(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue