Skip to content

Commit

Permalink
Fix emitting dataChanged signal in TorrentsModel (#369)
Browse files Browse the repository at this point in the history
last in Rpc::onChangedTorrents actually means after-the-last.
  • Loading branch information
equeim committed Nov 19, 2024
1 parent 1929497 commit 098f5da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Black screen issues when closing fullscreen window on macOS
- File dialog being shown twice in some Linux environments
- Crash with GCC 12
- Torrent's details in list not being updated for most recently added torrent

## [2.7.2] - 2024-09-15
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion src/ui/screens/mainwindow/torrentsmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ namespace tremotesf {
QObject::connect(rpc, &Rpc::onChangedTorrents, this, [=, this](size_t first, size_t last) {
emit dataChanged(
index(static_cast<int>(first), 0),
index(static_cast<int>(last), columnCount() - 1)
index(static_cast<int>(last - 1), columnCount() - 1)
);
});

Expand Down

0 comments on commit 098f5da

Please sign in to comment.