X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fbufferview.cpp;h=4217d566ca4d83867e7895960c585049ee19d8f3;hb=92c88ffefa550de3a6ae03a7adbe605719f8349c;hp=aa349f62ea5dddafa69248aeca8cb9dc5fc7ca6d;hpb=73696998505c35c02bd019f78e9f502cbc36da5b;p=quassel.git diff --git a/src/uisupport/bufferview.cpp b/src/uisupport/bufferview.cpp index aa349f62..4217d566 100644 --- a/src/uisupport/bufferview.cpp +++ b/src/uisupport/bufferview.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-08 by the Quassel Project * + * Copyright (C) 2005-09 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -411,7 +411,12 @@ void BufferView::contextMenuEvent(QContextMenuEvent *event) { } void BufferView::addActionsToMenu(QMenu *contextMenu, const QModelIndex &index) { - Client::mainUi()->actionProvider()->addActions(contextMenu, index, this, "menuActionTriggered", (bool)config()); + QModelIndexList indexList = selectedIndexes(); + // make sure the item we clicked on is first + indexList.removeAll(index); + indexList.prepend(index); + + Client::mainUi()->actionProvider()->addActions(contextMenu, indexList, this, "menuActionTriggered", (bool)config()); } void BufferView::addFilterActions(QMenu *contextMenu, const QModelIndex &index) {