1
0
Fork 0

Allow editing columns of the disassembly view

This commit is contained in:
Duncan Ogilvie 2022-09-10 01:10:03 +02:00
parent 580cd3d9c2
commit 870039f1d1
3 changed files with 12 additions and 6 deletions

View File

@ -199,6 +199,13 @@ void AbstractTableView::setupColumnConfigDefaultValue(QMap<QString, duint> & map
}
}
void AbstractTableView::editColumnDialog()
{
ColumnReorderDialog reorderDialog(this);
reorderDialog.setWindowTitle(tr("Edit columns"));
reorderDialog.exec();
}
/************************************************************************************
Painting Stuff
************************************************************************************/
@ -500,9 +507,7 @@ void AbstractTableView::mousePressEvent(QMouseEvent* event)
{
if(event->y() < getHeaderHeight())
{
ColumnReorderDialog reorderDialog(this);
reorderDialog.setWindowTitle(tr("Edit columns"));
reorderDialog.exec();
editColumnDialog();
event->accept();
}
}
@ -565,9 +570,7 @@ void AbstractTableView::mouseDoubleClickEvent(QMouseEvent* event)
{
if(event->y() < getHeaderHeight())
{
ColumnReorderDialog reorderDialog(this);
reorderDialog.setWindowTitle(tr("Edit columns"));
reorderDialog.exec();
editColumnDialog();
event->accept();
}
}

View File

@ -143,6 +143,8 @@ public slots:
// ScrollBar Management
void vertSliderActionSlot(int action);
void editColumnDialog();
protected slots:
void ShowDisassemblyPopup(duint addr, int x, int y); // this should probably be a slot, but doesn't need emit fixes (it's already used correctly)
void timerEvent(QTimerEvent* event);

View File

@ -363,6 +363,7 @@ void CPUDisassembly::setupRightClickContextMenu()
});
mMenuBuilder->addAction(makeShortcutAction(DIcon("highlight"), tr("&Highlighting mode"), SLOT(enableHighlightingModeSlot()), "ActionHighlightingMode"));
mMenuBuilder->addAction(makeAction("Edit columns...", SLOT(editColumnDialog())));
MenuBuilder* labelMenu = new MenuBuilder(this);
labelMenu->addAction(makeShortcutAction(tr("Label Current Address"), SLOT(setLabelSlot()), "ActionSetLabel"));