From bcbb440ad4a2867473a968a0dbd3e8dfcf954ec9 Mon Sep 17 00:00:00 2001 From: Theophile Terraz Date: Tue, 21 Oct 2025 15:11:28 +0200 Subject: [PATCH 1/3] debug import friction --- src/View/Frictions/Table.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/View/Frictions/Table.py b/src/View/Frictions/Table.py index 64a3e18f..7b5d278c 100644 --- a/src/View/Frictions/Table.py +++ b/src/View/Frictions/Table.py @@ -274,15 +274,14 @@ class FrictionTableModel(PamhyrTableModel): with open(file_name, encoding="utf-8") as rug_file: for line in rug_file: if line.upper().startswith("K"): - line = line.split() - if int(line[1]) == reach_id: - data.append(line[1:]) + if int(line[1:4]) == reach_id: + data.append(line[4:].split()) new_data = [] for d in data: new = None - minor = float(d[3]) - medium = float(d[4]) + minor = float(d[2]) + medium = float(d[3]) for s in self._study.river.stricklers.stricklers: if s.minor == minor and s.medium == medium: new = s @@ -292,5 +291,5 @@ class FrictionTableModel(PamhyrTableModel): self._study.river.stricklers)) new.minor = minor new.medium = medium - new_data.append([self._data, float(d[1]), float(d[2]), new, new]) + new_data.append([self._data, float(d[0]), float(d[1]), new, new]) self.replace_data(new_data) From 0112ad63d9d903361e8ee7fbad60fc624507cdff Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Rouby Date: Tue, 21 Oct 2025 15:38:12 +0200 Subject: [PATCH 2/3] Network: Resize network zone. --- src/View/Network/GraphWidget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/View/Network/GraphWidget.py b/src/View/Network/GraphWidget.py index e3ac1aed..3fa0cfb0 100644 --- a/src/View/Network/GraphWidget.py +++ b/src/View/Network/GraphWidget.py @@ -475,7 +475,7 @@ class GraphWidget(QGraphicsView): def setup_scene(self, min_size, max_size, size): scene = QGraphicsScene(self) scene.setItemIndexMethod(QGraphicsScene.NoIndex) - scene.setSceneRect(0, 0, 2000, 2000) + scene.setSceneRect(0, 0, 6000, 6000) self.setScene(scene) self.setCacheMode(QGraphicsView.CacheBackground) From a29df8f904e326dff5852fc465993fd6363f9652 Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Rouby Date: Tue, 21 Oct 2025 17:28:16 +0200 Subject: [PATCH 3/3] Network: Center on previous size. --- src/View/Network/GraphWidget.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/View/Network/GraphWidget.py b/src/View/Network/GraphWidget.py index 3fa0cfb0..08c08011 100644 --- a/src/View/Network/GraphWidget.py +++ b/src/View/Network/GraphWidget.py @@ -486,6 +486,7 @@ class GraphWidget(QGraphicsView): self.scale(1, 1) self.previousScale = 1 + self.centerOn(1000.0, 1000.0) if min_size: self.setMinimumSize(*min_size)