Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select the last row in follower table #201

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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=info@hytech-imaging.fr
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
Loading