1
0
Fork 0

Merge branch 'master' into performance_improvement

This commit is contained in:
Mr. eXoDia 2014-06-20 00:45:47 +02:00
commit f4f7797d08
2 changed files with 20 additions and 10 deletions

View File

@ -24,7 +24,14 @@ void CPUDisassembly::mousePressEvent(QMouseEvent* event)
}
}
else
{
Disassembly::mousePressEvent(event);
if(mHighlightingMode) //disable highlighting mode after clicked
{
mHighlightingMode=false;
reloadData();
}
}
}
void CPUDisassembly::mouseDoubleClickEvent(QMouseEvent* event)
@ -168,9 +175,14 @@ void CPUDisassembly::contextMenuEvent(QContextMenuEvent* event)
}
wMenu->addMenu(mBPMenu);
wMenu->addSeparator();
wMenu->addAction(mEnableHighlightingMode);
// Separator
wMenu->addSeparator();
// New origin
wMenu->addAction(mSetNewOriginHere);
@ -203,9 +215,6 @@ void CPUDisassembly::contextMenuEvent(QContextMenuEvent* event)
mReferencesMenu->addAction(mReferenceSelectedAddress);
wMenu->addMenu(mReferencesMenu);
wMenu->addSeparator();
wMenu->addAction(mToggleHighlightingMode);
QAction* wAction = wMenu->exec(event->globalPos());
}
}
@ -355,10 +364,11 @@ void CPUDisassembly::setupRightClickContextMenu()
connect(mSearchStrings, SIGNAL(triggered()), this, SLOT(findStrings()));
// Highlighting mode
mToggleHighlightingMode = new QAction("Toggle &highlighting mode", this);
mToggleHighlightingMode->setShortcutContext(Qt::WidgetShortcut);
mToggleHighlightingMode->setShortcut(QKeySequence("ctrl+h"));
connect(mToggleHighlightingMode, SIGNAL(triggered()), this, SLOT(toggleHighlightingMode()));
mEnableHighlightingMode = new QAction("&Highlighting mode", this);
mEnableHighlightingMode->setShortcutContext(Qt::WidgetShortcut);
mEnableHighlightingMode->setShortcut(QKeySequence("ctrl+h"));
this->addAction(mEnableHighlightingMode);
connect(mEnableHighlightingMode, SIGNAL(triggered()), this, SLOT(enableHighlightingMode()));
}
void CPUDisassembly::gotoOrigin()
@ -729,7 +739,7 @@ void CPUDisassembly::selectionSet(const SELECTIONDATA* selection)
Bridge::getBridge()->BridgeSetResult(1);
}
void CPUDisassembly::toggleHighlightingMode()
void CPUDisassembly::enableHighlightingMode()
{
if(mHighlightingMode)
mHighlightingMode=false;

View File

@ -56,7 +56,7 @@ public slots:
void findStrings();
void selectionGet(SELECTIONDATA* selection);
void selectionSet(const SELECTIONDATA* selection);
void toggleHighlightingMode();
void enableHighlightingMode();
private:
@ -88,7 +88,7 @@ private:
QAction* mReferenceSelectedAddress;
QAction* mSearchConstant;
QAction* mSearchStrings;
QAction* mToggleHighlightingMode;
QAction* mEnableHighlightingMode;
GotoDialog* mGoto;
};