Skip to content

Commit 29c6e95

Browse files
committed
breakpoint ui
1 parent dbf5d4f commit 29c6e95

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

emulator/src/Gui/CodeViewer.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,12 @@ void CodeViewer::DrawContent() {
110110
c.Begin(max_row, ImGui::GetTextLineHeight());
111111
while (c.Step()) {
112112
for (int line_i = c.DisplayStart; line_i < c.DisplayEnd; line_i++) {
113+
CodeElem e = codes[line_i];
114+
auto it = break_points.find(line_i);
113115
if (line_i == bp) {
114116
// the break point is triggered!
115117
ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), "[ > ]");
116-
}
117-
CodeElem e = codes[line_i];
118-
auto it = break_points.find(line_i);
119-
if (it == break_points.end() || !break_points[line_i]) {
118+
} else if (it == break_points.end() || !break_points[line_i]) {
120119
ImGui::Text("[ o ]");
121120
if (ImGui::IsItemHovered() && ImGui::IsMouseClicked(0)) {
122121
break_points[line_i] = 1;

0 commit comments

Comments
 (0)