breakpoints can now be deleted

This commit is contained in:
Lauchmelder 2022-03-01 12:06:40 +01:00
parent a93d653a93
commit e5cc1565fd
No known key found for this signature in database
GPG key ID: C2403C69D78F011D

View file

@ -227,10 +227,20 @@ void Disassembler::BreakpointWindow()
ImGui::Separator(); ImGui::Separator();
char label[6]; char label[6];
for (const Breakpoint& breakpoint : breakpoints) for (std::set<Breakpoint>::const_iterator it = breakpoints.begin(); it != breakpoints.end(); )
{ {
std::sprintf(label, "$%04X", breakpoint.GetAddress()); if (ImGui::Button("X"))
ImGui::Checkbox(label, &breakpoint.active); {
it = breakpoints.erase(it);
continue;
}
ImGui::SameLine();
std::sprintf(label, "$%04X", it->GetAddress());
ImGui::Checkbox(label, &it->active);
it++;
} }
ImGui::End(); ImGui::End();