Skip to content

Modules widget: copy only copies the first selected cell #1114

Description

@xusheng6

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions