Do not seek after adding a comment

This commit is contained in:
Florian Märkl 2017-12-01 10:12:05 +01:00
parent 6c3d1d2582
commit 82e2ddf6e6

View File

@ -151,16 +151,11 @@ QKeySequence DisassemblyContextMenu::getDisplayOptionsSequence() const
void DisassemblyContextMenu::on_actionAddComment_triggered() void DisassemblyContextMenu::on_actionAddComment_triggered()
{ {
RAnalFunction *fcn = Core()->functionAt(offset);
CommentsDialog *c = new CommentsDialog(this); CommentsDialog *c = new CommentsDialog(this);
if (c->exec()) if (c->exec())
{ {
QString comment = c->getComment(); QString comment = c->getComment();
Core()->setComment(offset, comment); Core()->setComment(offset, comment);
if (fcn)
{
Core()->seek(fcn->addr);
}
} }
} }