Skip to content

Commit 9f530c3

Browse files
committed
GUI: Eliminate flicker in infobox when scrolling
1 parent 6e97553 commit 9f530c3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/gui/Src/Gui/CPUInfoBox.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,16 @@ void CPUInfoBox::setInfoLine(int line, QString text)
3535
{
3636
if(line < 0 || line > 2)
3737
return;
38+
3839
setCellContent(line, 0, text);
3940
reloadData();
4041
}
4142

4243
QString CPUInfoBox::getInfoLine(int line)
4344
{
4445
if(line < 0 || line > 2)
45-
return QString();
46+
return "";
47+
4648
return getCellContent(line, 0);
4749
}
4850

@@ -97,7 +99,10 @@ void CPUInfoBox::disasmSelectionChanged(dsint parVA)
9799
curAddr = parVA;
98100
if(!DbgIsDebugging() || !DbgMemIsValidReadPtr(parVA))
99101
return;
100-
clear();
102+
103+
// Rather than using clear() or setInfoLine(), only reset the first two cells to reduce flicker
104+
setCellContent(0, 0, "");
105+
setCellContent(1, 0, "");
101106

102107
DISASM_INSTR instr;
103108
memset(&instr, 0, sizeof(instr));

0 commit comments

Comments
 (0)