Browse Source

Made right click menu work for multiple selection in DL list

adaptive-webui-19844
Christophe Dumez 18 years ago
parent
commit
ee8bc5cdaf
  1. 1
      Changelog
  2. 8
      src/GUI.cpp

1
Changelog

@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
- FEATURE: Brand new trayicon from Qt 4.2
- FEATURE: Added a torrent addition dialog
- I18N: Added Finnish translation
- BUGFIX: Made right click menu work for multiple selection in DL list
- COSMETIC: Replaced OSD messages by systray messages
- COSMETIC: Displaying save path in torrent properties window

8
src/GUI.cpp

@ -358,11 +358,7 @@ void GUI::cleanTempPreviewFile(int, QProcess::ExitStatus){ @@ -358,11 +358,7 @@ void GUI::cleanTempPreviewFile(int, QProcess::ExitStatus){
void GUI::displayDLListMenu(const QPoint& pos){
QMenu myDLLlistMenu(this);
// Clear selection
downloadList->clearSelection();
// Select items
QModelIndex index = downloadList->indexAt(pos);
selectGivenRow(index);
QModelIndex index;
// Enable/disable pause/start action given the DL state
QModelIndexList selectedIndexes = downloadList->selectionModel()->selectedIndexes();
foreach(index, selectedIndexes){
@ -378,7 +374,7 @@ void GUI::displayDLListMenu(const QPoint& pos){ @@ -378,7 +374,7 @@ void GUI::displayDLListMenu(const QPoint& pos){
}
myDLLlistMenu.addAction(actionDelete);
myDLLlistMenu.addAction(actionTorrent_Properties);
if(!options->getPreviewProgram().isEmpty() && isFilePreviewPossible(h)){
if(!options->getPreviewProgram().isEmpty() && isFilePreviewPossible(h) && selectedIndexes.size()<=DLListModel->columnCount()){
myDLLlistMenu.addAction(actionPreview_file);
}
break;

Loading…
Cancel
Save