Skip to content

Commit

Permalink
fix strate to strateType + load merged project
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienPeillet committed Nov 27, 2023
1 parent 5ee4bee commit 0a8bd41
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 9 deletions.
3 changes: 2 additions & 1 deletion data/survey.csv
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
region,survey,computer,shipName,cycle,session
region,survey,computer,shipName,cycle,session
NEA,IBTS,computer_1,Europe,cycle_1,LEG1
2 changes: 1 addition & 1 deletion data/transect.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
transect;strate;subRegion;length;wkt
transect;strateType;subRegion;length;wkt
2 changes: 1 addition & 1 deletion doc/source/interface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ dialog as each can contains more than one entity.

Especially for `Transect` table, it is possible to import a linear layer
(EPSG:4326). The imported layer must have the same attribute names as the
`Transect` table (transect,strate,subRegion,length). Transect entity reference
`Transect` table (transect,strateType,subRegion,length). Transect entity reference
will be available in the `Environment` table.

3 - |save| Validation button
Expand Down
2 changes: 1 addition & 1 deletion src/core/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def _fieldsSurvey(self) -> QgsFields:
def _fieldsTransect(self) -> QgsFields:
fields = QgsFields()
fields.append(self._createFieldShortText("transect"))
fields.append(self._createFieldShortText("strate"))
fields.append(self._createFieldShortText("strateType"))
fields.append(self._createFieldShortText("subRegion"))
fields.append(QgsField("length", QVariant.Int))

Expand Down
2 changes: 1 addition & 1 deletion src/core/layers/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def _init_widgets(self, layer: QgsVectorLayer) -> None:
"shipName",
"computer",
"transect",
"strate",
"strateType",
"length",
"plateformHeight",
"_effortGroup",
Expand Down
2 changes: 1 addition & 1 deletion src/core/layers/transect.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def _init_symbology(self, layer) -> None:

def _init_widgets(self, layer: QgsVectorLayer) -> None:
# strate
idx = layer.fields().indexFromName("strate")
idx = layer.fields().indexFromName("strateType")
cfg = {}
cfg["map"] = [
{"Neritic": "Neritic"},
Expand Down
2 changes: 1 addition & 1 deletion src/core/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ def _addFeature(
"shipName",
"computer",
"transect",
"strate",
"strateType",
"length",
"comment",
"species",
Expand Down
2 changes: 1 addition & 1 deletion src/gui/attribute_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def attributeTable(
"shipName",
"computer",
"transect",
"strate",
"strateType",
"length",
"plateformHeight",
"observer",
Expand Down
2 changes: 1 addition & 1 deletion src/gui/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def environmentLayerJoinTransectInfo(self, layer: QgsVectorLayer) -> None:
joinInfo.setJoinFieldName("fid")
joinInfo.setTargetFieldName("transectId")
joinInfo.setPrefix("")
joinInfo.setJoinFieldNamesSubset(["transect", "strate", "length"])
joinInfo.setJoinFieldNamesSubset(["transect", "strateType", "length"])
return joinInfo

def addEndEffortFeature(self, layer: QgsVectorLayer) -> QgsVectorLayer:
Expand Down
1 change: 1 addition & 0 deletions src/gui/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def after_task(self):
else:
iface.messageBar().pushInfo("MergeTask", "Merge success")
self.ok.setText("Success")
self.mergeEnded.emit(self.sessionMergedDir.text())
self.show()


Expand Down

0 comments on commit 0a8bd41

Please sign in to comment.