mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 23:07:59 +00:00
Don't show a popup menu when no torrent is selected.
This commit is contained in:
parent
0a3dadf3fb
commit
bf291dbfb1
@ -695,6 +695,9 @@ void TransferListWidget::removeLabelFromRows(QString label) {
|
||||
}
|
||||
|
||||
void TransferListWidget::displayListMenu(const QPoint&) {
|
||||
QModelIndexList selectedIndexes = selectionModel()->selectedRows();
|
||||
if (selectedIndexes.size() == 0)
|
||||
return;
|
||||
// Create actions
|
||||
QAction actionStart(IconProvider::instance()->getIcon("media-playback-start"), tr("Resume", "Resume/start the torrent"), 0);
|
||||
connect(&actionStart, SIGNAL(triggered()), this, SLOT(startSelectedTorrents()));
|
||||
@ -740,7 +743,6 @@ void TransferListWidget::displayListMenu(const QPoint&) {
|
||||
// End of actions
|
||||
QMenu listMenu(this);
|
||||
// Enable/disable pause/start action given the DL state
|
||||
QModelIndexList selectedIndexes = selectionModel()->selectedRows();
|
||||
bool has_pause = false, has_start = false, has_preview = false;
|
||||
bool all_same_super_seeding = true;
|
||||
bool super_seeding_mode = false;
|
||||
|
Loading…
Reference in New Issue
Block a user