mirror of https://gitlab.com/pamhyr/pamhyr2
Pamhyr2: Fix pep8.
parent
8dcb0a298e
commit
efd8960e1e
|
|
@ -818,18 +818,18 @@ class GraphWidget(QGraphicsView):
|
|||
# If state is "move"
|
||||
if self._state == "move":
|
||||
# Move on scene
|
||||
if (not self.selected_item() and
|
||||
(event.buttons() & Qt.LeftButton)):
|
||||
old_p = self.mapToScene(
|
||||
int(self.m_origin_x), int(self.m_origin_y)
|
||||
)
|
||||
new_p = self.mapToScene(event.pos())
|
||||
translation = new_p - old_p
|
||||
if not self.selected_item():
|
||||
if event.buttons() & Qt.LeftButton:
|
||||
old_p = self.mapToScene(
|
||||
int(self.m_origin_x), int(self.m_origin_y)
|
||||
)
|
||||
new_p = self.mapToScene(event.pos())
|
||||
translation = new_p - old_p
|
||||
|
||||
self.translate(translation.x(), translation.y())
|
||||
self.translate(translation.x(), translation.y())
|
||||
|
||||
self.m_origin_x = event.x()
|
||||
self.m_origin_y = event.y()
|
||||
self.m_origin_x = event.x()
|
||||
self.m_origin_y = event.y()
|
||||
|
||||
# Propagate event
|
||||
self.update()
|
||||
|
|
|
|||
|
|
@ -162,7 +162,10 @@ class SolverLogWindow(PamhyrWindow):
|
|||
if ok:
|
||||
self.run()
|
||||
else:
|
||||
self._log(f" *** Failed to export study to {self._solver._type}", color="red")
|
||||
self._log(
|
||||
f" *** Failed to export study to {self._solver._type}",
|
||||
color="red"
|
||||
)
|
||||
|
||||
def setup_action(self):
|
||||
self.find(QAction, "action_start").setEnabled(False)
|
||||
|
|
@ -324,7 +327,11 @@ class SolverLogWindow(PamhyrWindow):
|
|||
def start(self):
|
||||
if self._solver.is_stoped():
|
||||
self._log(f" *** Export study {self._solver.name}", color="blue")
|
||||
ok = self._solver.export(self._study, self._workdir, qlog=self._output)
|
||||
|
||||
ok = self._solver.export(
|
||||
self._study, self._workdir, qlog=self._output
|
||||
)
|
||||
|
||||
if not ok:
|
||||
self._log(f" *** Failed to export", color="red")
|
||||
self.update()
|
||||
|
|
|
|||
|
|
@ -70,17 +70,17 @@ class PamhyrPlot(APlot):
|
|||
self._label_x = "X"
|
||||
self._label_y = "Y"
|
||||
|
||||
self._isometric_axis = True #: Use isometric view
|
||||
self._isometric_axis = True #: Use isometric view
|
||||
|
||||
self._auto_relim = True #: Auto relim axes at plot creation
|
||||
self._autoscale = True #: Auto scale at plot creation
|
||||
self._auto_relim = True #: Auto relim axes at plot creation
|
||||
self._autoscale = True #: Auto scale at plot creation
|
||||
|
||||
self._auto_relim_update = False #: Auto relim axes at plot update
|
||||
self._autoscale_update = False #: Auto scale at plot creation
|
||||
self._auto_relim_update = False #: Auto relim axes at plot update
|
||||
self._autoscale_update = False #: Auto scale at plot creation
|
||||
|
||||
self._highlight_data = None #: Data identifier to highlight (free type)
|
||||
self._highlight_data = None #: Data identifier to highlight
|
||||
self._highlight_data_update = False
|
||||
self._current_data = None #: Current data identifier (free type)
|
||||
self._current_data = None #: Current data identifier
|
||||
self._current_data_update = False
|
||||
|
||||
super(PamhyrPlot, self).__init__(data=data)
|
||||
|
|
|
|||
Loading…
Reference in New Issue