diff --git a/src/plugins/debugger/stackwindow.cpp b/src/plugins/debugger/stackwindow.cpp index 0dd0bc0cd53cd1b71a116b426c57857988ad31a8..dcb85cc02b53c35644266e83733a8511f54a4bac 100644 --- a/src/plugins/debugger/stackwindow.cpp +++ b/src/plugins/debugger/stackwindow.cpp @@ -121,11 +121,9 @@ static inline StackFrame inputFunctionForDisassembly() void StackWindow::contextMenuEvent(QContextMenuEvent *ev) { - QModelIndexList si = selectedIndices(ev); - QTC_ASSERT(si.size() == 1, return); DebuggerEngine *engine = currentEngine(); StackHandler *handler = engine->stackHandler(); - const QModelIndex index = si.at(0); + const QModelIndex index = indexAt(ev->pos()); const int row = index.row(); StackFrame frame; if (row >= 0 && row < handler->stackSize())