Modules widget: copy only copies the first selected cell

Open Beginner friendly
#1,114 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
cpp
Domain
desktop

Research direction

Start in ui/moduleswidget.cpp at DebugModulesWidget::copy(), then compare it with the fixed DebugMemoryMapWidget::copy() implementation. Port the relevant selection handling so every selected cell is copied in visual order, with tab-separated columns and newline-separated rows.

Written by the indexing model from the issue text.

Description

Description

In the Debugger Modules sidebar widget, selecting multiple cells and copying (Ctrl+C / right-click → Copy) only copies the contents of the first selected cell. All other selected cells are ignored.

Cause

DebugModulesWidget::copy() in ui/moduleswidget.cpp only reads sel[0]:

QModelIndexList sel = selectionModel()->selectedIndexes();
if (sel.empty())
    return;

auto sourceIndex = m_filter->mapToSource(sel[0]);   // <-- only the first cell
...
switch (sel[0].column()) { ... }

It should iterate over all selected indexes.

Expected behavior

Copy the contents of every selected cell — grouped by row (tab-separated columns within a row, newline between rows), in visual order — matching typical table-copy behavior.

Notes

The same bug existed in the Memory Map widget (DebugMemoryMapWidget::copy()) and has been fixed there; the same fix should be ported to the Modules widget. See DebugMemoryMapWidget::copy() for the reference implementation.

Dominant language
C++
Stars
331
Forks
33
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Vector35/debugger

All issues in Vector35/debugger

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.