[glass] Plot: allow for more than 11 plots (#4685)

Since m_windows is sorted using the ascii, when "Plot <10>" is reached it will be before "Plot <2>" in `m_windows` which makes it so it will not add a new plot after the id 10 is reached. This also fixes a potential issue of someone manually changing an id in the file, which would break adding a new plot in some circumstances.
This commit is contained in:
ohowe
2022-11-23 14:57:29 -07:00
committed by GitHub
parent 3fe8d355a1
commit 4307d0ee8b

View File

@@ -991,7 +991,7 @@ void PlotProvider::DisplayMenu() {
for (size_t i = 0; i <= numWindows; ++i) {
std::snprintf(id, sizeof(id), "Plot <%d>", static_cast<int>(i));
bool match = false;
for (size_t j = i; j < numWindows; ++j) {
for (size_t j = 0; j < numWindows; ++j) {
if (m_windows[j]->GetId() == id) {
match = true;
break;