Compare commits

...
5 changed files with 22 additions and 9 deletions

No files matched your search

+3 -3
View File
@@ -43,12 +43,12 @@ class Friction(SQLSubModel):
execute("""
CREATE TABLE friction(
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
ind INTERGER NOT NULL,
ind INTEGER NOT NULL,
begin_kp REAL NOT NULL,
end_kp REAL NOT NULL,
reach INTEGER NOT NULL,
begin_strickler INTERGER,
end_strickler INTERGER,
begin_strickler INTEGER NOT NULL,
end_strickler INTEGER NOT NULL,
FOREIGN KEY(reach) REFERENCES river_reach(id),
FOREIGN KEY(begin_strickler) REFERENCES stricklers(id),
FOREIGN KEY(end_strickler) REFERENCES stricklers(id)
+2 -2
View File
@@ -29,9 +29,9 @@ class GeometryTranslate(PamhyrTranslate):
self._dict["open_file"] = _translate("Geometry", "Open a file")
self._dict["file_st"] = _translate(
"Geometry", "File mage geometry (*.ST)")
"Geometry", "File mage geometry (*.ST *.st)")
self._dict["file_m"] = _translate(
"Geometry", "File mage meshed geometry (*.M)")
"Geometry", "File mage meshed geometry (*.M *.m)")
self._dict["file_all"] = _translate("Geometry", "All file (*)")
self._dict["reach"] = _translate("Geometry", "reach")
+13 -1
View File
@@ -454,9 +454,21 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
"", "Pamhyr(*.pamhyr)"
)
if file_name.rsplit(".", 1)[-1] == ".pamhyr":
logger.debug(f"Save study as : {repr(file_name)}")
if file_name == "":
return
if file_name.rsplit(".", 1)[-1] == "pamhyr":
logger.debug(
"Pamhyr extention is present : " +
f"{repr(file_name)}"
)
self._study.filename = file_name
else:
logger.debug(
"Pamhyr extention is not present : " +
f"{repr(file_name + '.pamhyr')}"
)
self._study.filename = file_name + ".pamhyr"
sql_request_count = self._study.sql_save_request_count()
+2 -1
View File
@@ -174,7 +174,8 @@ class EdgeItem(QGraphicsItem):
return
# Select color
color = Qt.darkBlue
# color = Qt.darkBlue
color = Qt.black
if self.graph.selected_item() == self:
color = Qt.red
elif self.graph.current_edge() == self:
+2 -2
View File
@@ -264,8 +264,8 @@
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="shortcut">