Geometry: Profile: Forbidden duplicate window for profile editing.

results
Pierre-Antoine Rouby 2023-08-04 15:32:09 +02:00
parent ec9a061f9a
commit 289c8ed129
1 changed files with 12 additions and 5 deletions

View File

@ -184,13 +184,20 @@ class GeometryWindow(ASubMainWindow, ListedSubWindow):
for row in rows: for row in rows:
profile = self._reach.profile(row) profile = self._reach.profile(row)
win = self.sub_win_filter_first(
"Profile",
contain = [self._reach.name, str(profile.kp)]
)
if win is None:
win = ProfileWindow( win = ProfileWindow(
profile = profile, profile = profile,
parent = self, parent = self,
) )
self._profile_window.append(win) self._profile_window.append(win)
win.show() win.show()
else:
win.activateWindow()
self.tableView.model().blockSignals(False) self.tableView.model().blockSignals(False)