[nostalgia/core/studio] Fix PaletteEditor to handle Palettes with 0 pages
All checks were successful
Build / build (push) Successful in 2m55s
All checks were successful
Build / build (push) Successful in 2m55s
This commit is contained in:
parent
941bc71348
commit
3c7652efc2
@ -154,6 +154,7 @@ void PaletteEditorImGui::drawColorsEditor() noexcept {
|
|||||||
ImGui::TableSetupColumn("Blue", ImGuiTableColumnFlags_WidthFixed, 40);
|
ImGui::TableSetupColumn("Blue", ImGuiTableColumnFlags_WidthFixed, 40);
|
||||||
ImGui::TableSetupColumn("Preview", ImGuiTableColumnFlags_NoHide);
|
ImGui::TableSetupColumn("Preview", ImGuiTableColumnFlags_NoHide);
|
||||||
ImGui::TableHeadersRow();
|
ImGui::TableHeadersRow();
|
||||||
|
if (m_page < m_pal.pages.size()) {
|
||||||
for (auto i = 0u; auto const &c: m_pal.pages[m_page].colors) {
|
for (auto i = 0u; auto const &c: m_pal.pages[m_page].colors) {
|
||||||
ig::IDStackItem const idStackItem(static_cast<int>(i));
|
ig::IDStackItem const idStackItem(static_cast<int>(i));
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
@ -172,6 +173,7 @@ void PaletteEditorImGui::drawColorsEditor() noexcept {
|
|||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
if (colorEditor) {
|
if (colorEditor) {
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
Loading…
Reference in New Issue
Block a user