open replays on double-click in replays tab (#5323)

This commit is contained in:
RickyRister 2024-12-24 21:34:43 -08:00 committed by GitHub
parent 2b9d7538bf
commit 4c3ceae0e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 26 additions and 1 deletions

View file

@ -131,6 +131,13 @@ void TabReplays::retranslateUi()
aDeleteRemoteReplay->setText(tr("Delete"));
}
void TabReplays::actLocalDoubleClick(const QModelIndex &curLeft)
{
if (!localDirModel->isDir(curLeft)) {
actOpenLocalReplay();
}
}
void TabReplays::actOpenLocalReplay()
{
QModelIndexList curLefts = localDirView->selectionModel()->selectedRows();
@ -192,6 +199,13 @@ void TabReplays::actDeleteLocalReplay()
}
}
void TabReplays::actRemoteDoubleClick(const QModelIndex &curRight)
{
if (serverDirView->getReplay(curRight)) {
actOpenRemoteReplay();
}
}
void TabReplays::actOpenRemoteReplay()
{
auto const curRights = serverDirView->getSelectedReplays();