From 18d02834637d68c8d2cb86e947b23ed7e7fc3b8d Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sat, 12 Dec 2009 21:59:06 +0000 Subject: [PATCH] - Fix column hiding behavior when queueing system is disabled --- src/transferlistwidget.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/transferlistwidget.cpp b/src/transferlistwidget.cpp index 9f57cbae6..4a3aa32a0 100644 --- a/src/transferlistwidget.cpp +++ b/src/transferlistwidget.cpp @@ -762,7 +762,10 @@ void TransferListWidget::displayDLHoSMenu(const QPoint&){ hideshowColumn.setTitle(tr("Column visibility")); QList actions; for(int i=0; i < TR_HASH; ++i) { - if(!BTSession->isQueueingEnabled() && i == TR_PRIORITY) continue; + if(!BTSession->isQueueingEnabled() && i == TR_PRIORITY) { + actions.append(0); + continue; + } QIcon icon; if(isColumnHidden(i)) icon = QIcon(QString::fromUtf8(":/Icons/oxygen/button_cancel.png")); @@ -771,9 +774,12 @@ void TransferListWidget::displayDLHoSMenu(const QPoint&){ actions.append(hideshowColumn.addAction(icon, listModel->headerData(i, Qt::Horizontal).toString())); } // Call menu - QAction *act = hideshowColumn.exec(QCursor::pos()); - int col = actions.indexOf(act); - setColumnHidden(col, !isColumnHidden(col)); + QAction *act = 0; + act = hideshowColumn.exec(QCursor::pos()); + if(act) { + int col = actions.indexOf(act); + setColumnHidden(col, !isColumnHidden(col)); + } } #ifdef LIBTORRENT_0_15