mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 13:53:37 -07:00
Don't show a popup menu when no torrent is selected.
This commit is contained in:
parent
36d299f891
commit
7555380964
1 changed files with 3 additions and 1 deletions
|
@ -688,6 +688,9 @@ void TransferListWidget::removeLabelFromRows(QString label) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransferListWidget::displayListMenu(const QPoint&) {
|
void TransferListWidget::displayListMenu(const QPoint&) {
|
||||||
|
QModelIndexList selectedIndexes = selectionModel()->selectedRows();
|
||||||
|
if (selectedIndexes.size() == 0)
|
||||||
|
return;
|
||||||
// Create actions
|
// Create actions
|
||||||
QAction actionStart(IconProvider::instance()->getIcon("media-playback-start"), tr("Resume", "Resume/start the torrent"), 0);
|
QAction actionStart(IconProvider::instance()->getIcon("media-playback-start"), tr("Resume", "Resume/start the torrent"), 0);
|
||||||
connect(&actionStart, SIGNAL(triggered()), this, SLOT(startSelectedTorrents()));
|
connect(&actionStart, SIGNAL(triggered()), this, SLOT(startSelectedTorrents()));
|
||||||
|
@ -733,7 +736,6 @@ void TransferListWidget::displayListMenu(const QPoint&) {
|
||||||
// End of actions
|
// End of actions
|
||||||
QMenu listMenu(this);
|
QMenu listMenu(this);
|
||||||
// Enable/disable pause/start action given the DL state
|
// Enable/disable pause/start action given the DL state
|
||||||
QModelIndexList selectedIndexes = selectionModel()->selectedRows();
|
|
||||||
bool has_pause = false, has_start = false, has_preview = false;
|
bool has_pause = false, has_start = false, has_preview = false;
|
||||||
bool all_same_super_seeding = true;
|
bool all_same_super_seeding = true;
|
||||||
bool super_seeding_mode = false;
|
bool super_seeding_mode = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue