Skip to content

Commit

Permalink
Merge pull request #201 from hytechimaging/followers_focus_line
Browse files Browse the repository at this point in the history
Select the last row in follower table
  • Loading branch information
SebastienPeillet authored Aug 22, 2024
2 parents 521bac5 + df39ae1 commit 8118119
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

-----
## [v1.4.2] - 2024-08-22

### Modified

- Follower table : focus on the new added entity

-----
## [v1.4.1] - 2024-03-14

Expand Down Expand Up @@ -240,6 +247,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0



[v1.4.2]: https://github.com/hytechimaging/sammo-boat/releases/tag/v1.4.2
[v1.4.1]: https://github.com/hytechimaging/sammo-boat/releases/tag/v1.4.1
[v1.4.0]: https://github.com/hytechimaging/sammo-boat/releases/tag/v1.4.0
[v1.3.2]: https://github.com/hytechimaging/sammo-boat/releases/tag/v1.3.2
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION := "1.4.1"
VERSION := "1.4.2"
TMPDIR := "/tmp/sammo-boat-$(VERSION)"

venv:
Expand Down
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = "Hytech-Imaging"

# The full version, including alpha/beta/rc tags
release = "1.4.1"
release = "1.4.2"


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name=Sammo-Boat
description=Tool for megafauna observations from halieutic boats
about=Tool for megafauna observations
version=1.4.1
version=1.4.2
qgisMinimumVersion=3.28
author=Paul Blottière
[email protected]
Expand Down
10 changes: 6 additions & 4 deletions src/gui/attribute_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,19 @@ def refresh(

view = table.findChild(QTableView, "mTableView")
view.resizeColumnsToContents()
if layerName.casefold() in [
SIGHTINGS_TABLE,
FOLLOWERS_TABLE,
]:
if layerName.casefold() == SIGHTINGS_TABLE:
for i in range(view.model().columnCount()):
if view.model().headerData(i, 1) == "species":
index = view.model().index(0, i)
elif layerName.casefold() == ENVIRONMENT_TABLE:
for i in range(view.model().columnCount()):
if view.model().headerData(i, 1) == "routeType":
index = view.model().index(0, i)
elif layerName.casefold() == FOLLOWERS_TABLE:
for i in range(view.model().columnCount()):
if view.model().headerData(i, 1) == "species":
print(view.model().rowCount())
index = view.model().index(view.model().rowCount() - 1, i)

if not focus:
return
Expand Down
2 changes: 1 addition & 1 deletion src/gui/followers.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def refresh(self):
filterExpr = (
f"epoch(\"dateTime\") = epoch(to_datetime('{self.datetime}'))"
)
SammoAttributeTable.refresh(self.table, "Followers", filterExpr)
SammoAttributeTable.refresh(self.table, "Followers", filterExpr, True)

def eventFilter(self, obj, event):
if type(event) is QKeyEvent:
Expand Down

0 comments on commit 8118119

Please sign in to comment.