1
0
Fork 0

Change cursor to 👆 where appropriate in side bar and registers view (#1492)

* fixed a crash and enable user to dblclick on folding box

* fixed when eip is in the current function it cant select

* Change cursor to 👆 where appropriate

* update translations
This commit is contained in:
Torusrxxx 2017-03-12 02:00:35 +00:00 committed by Duncan Ogilvie
parent f45e2a73b3
commit ac4c5c2ed8
4 changed files with 49 additions and 28 deletions

View File

@ -386,37 +386,44 @@ static bool scriptinternalbranch(SCRIPTBRANCHTYPE type) //determine if we should
static bool scriptinternalcmd()
{
bool bContinue = true;
LINEMAPENTRY cur = linemap.at(scriptIp - 1);
if(cur.type == linecommand)
try // failed when scriptIp is bad
{
switch(scriptinternalcmdexec(cur.u.command))
LINEMAPENTRY cur = linemap.at(scriptIp - 1);
if(cur.type == linecommand)
{
case STATUS_CONTINUE:
break;
case STATUS_ERROR:
bContinue = false;
GuiScriptError(scriptIp, GuiTranslateText(QT_TRANSLATE_NOOP("DBG", "Error executing command!")));
break;
case STATUS_EXIT:
bContinue = false;
scriptIp = scriptinternalstep(0);
GuiScriptSetIp(scriptIp);
break;
case STATUS_PAUSE:
bContinue = false; //stop running the script
scriptIp = scriptinternalstep(scriptIp);
GuiScriptSetIp(scriptIp);
break;
switch(scriptinternalcmdexec(cur.u.command))
{
case STATUS_CONTINUE:
break;
case STATUS_ERROR:
bContinue = false;
GuiScriptError(scriptIp, GuiTranslateText(QT_TRANSLATE_NOOP("DBG", "Error executing command!")));
break;
case STATUS_EXIT:
bContinue = false;
scriptIp = scriptinternalstep(0);
GuiScriptSetIp(scriptIp);
break;
case STATUS_PAUSE:
bContinue = false; //stop running the script
scriptIp = scriptinternalstep(scriptIp);
GuiScriptSetIp(scriptIp);
break;
}
}
else if(cur.type == linebranch)
{
if(cur.u.branch.type == scriptcall) //calls have a special meaning
scriptstack.push_back(scriptIp);
if(scriptinternalbranch(cur.u.branch.type))
scriptIp = scriptlabelfind(cur.u.branch.branchlabel);
}
return bContinue;
}
else if(cur.type == linebranch)
catch(std::out_of_range &)
{
if(cur.u.branch.type == scriptcall) //calls have a special meaning
scriptstack.push_back(scriptIp);
if(scriptinternalbranch(cur.u.branch.type))
scriptIp = scriptlabelfind(cur.u.branch.branchlabel);
return false;
}
return bContinue;
}
DWORD WINAPI scriptRunSync(void* arg)

View File

@ -457,6 +457,7 @@ void CPUSideBar::mouseMoveEvent(QMouseEvent* event)
(mLine < 0 || mLine >= mInstrBuffer->size()))
{
QToolTip::hideText();
setCursor(QCursor(Qt::ArrowCursor));
return;
}
@ -475,6 +476,7 @@ void CPUSideBar::mouseMoveEvent(QMouseEvent* event)
QToolTip::showText(globalMousePos, tr("Breakpoint Not Set"));
break;
}
setCursor(QCursor(Qt::PointingHandCursor));
}
void CPUSideBar::drawJump(QPainter* painter, int startLine, int endLine, int jumpoffset, bool conditional, bool isexecute, bool isactive)

View File

@ -1668,10 +1668,16 @@ void RegistersView::mouseMoveEvent(QMouseEvent* event)
REGISTER_NAME r = REGISTER_NAME::UNKNOWN;
QString registerHelpInformation;
// do we find a corresponding register?
if(identifyRegister((event->y() - yTopSpacing) / (double)mRowHeight, event->x() / (double)mCharWidth, &r))\
if(identifyRegister((event->y() - yTopSpacing) / (double)mRowHeight, event->x() / (double)mCharWidth, &r))
{
registerHelpInformation = helpRegister(r);
setCursor(QCursor(Qt::PointingHandCursor));
}
else
{
registerHelpInformation = "";
setCursor(QCursor(Qt::ArrowCursor));
}
if(!registerHelpInformation.isEmpty())
QToolTip::showText(event->globalPos(), registerHelpInformation, this);
else

View File

@ -213,7 +213,10 @@ SOURCES += \
gui/Src/Utils/MenuBuilder.cpp \
gui/Src/Gui/SimpleTraceDialog.cpp \
gui/Src/Gui/StructWidget.cpp \
gui/Src/Gui/BreakpointsViewTable.cpp
gui/Src/Gui/BreakpointsViewTable.cpp \
dbg/formatfunctions.cpp \
dbg/types.cpp \
dbg/typesparser.cpp
HEADERS += \
gui/Src/Exports.h \
@ -437,7 +440,10 @@ HEADERS += \
dbg/commands/cmd-watch-control.h \
gui/Src/Gui/CustomizeMenuDialog.h \
gui/Src/Gui/SimpleTraceDialog.h \
gui/Src/Gui/BreakpointsViewTable.h
gui/Src/Gui/BreakpointsViewTable.h \
dbg/filemap.h \
dbg/formatfunctions.h \
dbg/types.h
FORMS += \
gui/Src/Gui/AppearanceDialog.ui \