diff --git a/src/nostalgia/modules/core/src/studio/paletteeditor/paletteeditor-imgui.cpp b/src/nostalgia/modules/core/src/studio/paletteeditor/paletteeditor-imgui.cpp index 1ae4f7bf..d6bc4a36 100644 --- a/src/nostalgia/modules/core/src/studio/paletteeditor/paletteeditor-imgui.cpp +++ b/src/nostalgia/modules/core/src/studio/paletteeditor/paletteeditor-imgui.cpp @@ -107,7 +107,7 @@ void PaletteEditorImGui::colorInput(ox::CStringView label, int &v, bool &inputFo void PaletteEditorImGui::drawColorsEditor() noexcept { constexpr auto tableFlags = ImGuiTableFlags_RowBg; auto const colorsSz = ImGui::GetContentRegionAvail(); - auto const colorEditor = m_selectedColorRow < colorCnt(m_pal, m_page); + auto colorEditor = m_selectedColorRow < colorCnt(m_pal, m_page); auto const colorEditorWidth = 220; static constexpr auto toolbarHeight = 40; { @@ -123,6 +123,7 @@ void PaletteEditorImGui::drawColorsEditor() noexcept { if (ImGui::Button("Remove", sz)) { std::ignore = pushCommand(m_pal, m_selectedColorRow); m_selectedColorRow = ox::min(colorCnt(m_pal, m_page) - 1, m_selectedColorRow); + colorEditor = m_selectedColorRow < colorCnt(m_pal, m_page); } ImGui::SameLine(); ImGui::BeginDisabled(m_selectedColorRow <= 0);