Add nicer displaying of 1 instruction loops (#3396)

* fix #3369
This commit is contained in:
Lorenzo Santangelo 2024-12-01 21:21:44 +01:00 committed by GitHub
parent 93a06f5edd
commit 6e894a1e60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -984,6 +984,11 @@ void DisassemblyLeftPanel::paintEvent(QPaintEvent *event)
int arrowLineNumber = offsetToLine(arrow.jmpToffset());
int lineArrowY = lineToPixels(arrowLineNumber);
if (lineStartNumber == arrowLineNumber) {
currentLineYPos += lineHeight / 4;
lineArrowY -= lineHeight / 4;
}
// Draw the lines
p.drawLine(rightOffset, currentLineYPos, rightOffset - lineOffset, currentLineYPos); // left
p.drawLine(rightOffset - lineOffset, currentLineYPos, rightOffset - lineOffset,