mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
BC, LC: Forbidden duplicate window.
This commit is contained in:
1 parent
289c8ed129
commit
94a0a96659
6 files changed
+57
-25
No files matched your search
@@ -71,7 +71,7 @@ class EditBoundaryConditionWindow(ASubMainWindow, ListedSubWindow):
|
||||
self._title = (
|
||||
_translate("Edit boundary condition", self._title) +
|
||||
f" - {self._study.name} " +
|
||||
f" - {self._data.name} " +
|
||||
f" - {self._data.name} ({self._data.id}) " +
|
||||
f"({long_types[self._data.bctype]} - {node_name})"
|
||||
)
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ logger = logging.getLogger()
|
||||
|
||||
class BoundaryConditionWindow(ASubMainWindow, ListedSubWindow):
|
||||
def __init__(self, title="Boundary conditions", study=None, parent=None):
|
||||
title = title + " - " + study.name
|
||||
self._title = title + " - " + study.name
|
||||
|
||||
super(BoundaryConditionWindow, self).__init__(
|
||||
name=title, ui="BoundaryConditions", parent=parent
|
||||
@@ -79,7 +79,7 @@ class BoundaryConditionWindow(ASubMainWindow, ListedSubWindow):
|
||||
self.setup_graph()
|
||||
self.setup_connections()
|
||||
|
||||
self.ui.setWindowTitle(title)
|
||||
self.ui.setWindowTitle(self._title)
|
||||
|
||||
def setup_sc(self):
|
||||
self._undo_stack = QUndoStack()
|
||||
@@ -220,9 +220,17 @@ class BoundaryConditionWindow(ASubMainWindow, ListedSubWindow):
|
||||
tab = self.current_tab()
|
||||
rows = self.index_selected_rows()
|
||||
for row in rows:
|
||||
win = EditBoundaryConditionWindow(
|
||||
data=self._bcs.get(tab, row),
|
||||
study=self._study,
|
||||
parent=self
|
||||
win = self.sub_win_filter_first(
|
||||
"Edit boundary condition",
|
||||
contain = [f"({self._bcs.get(tab, row).id})"]
|
||||
)
|
||||
win.show()
|
||||
|
||||
if win is None:
|
||||
win = EditBoundaryConditionWindow(
|
||||
data=self._bcs.get(tab, row),
|
||||
study=self._study,
|
||||
parent=self
|
||||
)
|
||||
win.show()
|
||||
else:
|
||||
win.activateWindow()
|
||||
Reference in new issue
Block a user