Compare commits

..

No commits in common. "1e34f91ebdf1cf30631e1a41cd8f60186b000c9f" and "66cd5c4a7eb142f2e89d21bce66c8f7a6762c598" have entirely different histories.

View File

@ -243,7 +243,7 @@ void PaletteEditorImGui::drawColorEditor() noexcept {
auto const&currentName = m_pal.colorNames[m_selectedColorRow];
ox::IString<50> name;
name = currentName;
auto const nameUpdated = ImGui::InputText("Name", name.data(), name.cap() + 1);
ImGui::InputText("Name", name.data(), name.cap() + 1);
bool inputFocused = ImGui::IsItemFocused();
ImGui::Separator();
colorInput("Red", r, inputFocused);
@ -269,9 +269,9 @@ void PaletteEditorImGui::drawColorEditor() noexcept {
if (c != newColor) {
std::ignore = pushCommand<UpdateColorCommand>(m_pal, m_page, m_selectedColorRow, newColor);
}
if (nameUpdated) {
if (currentName != name) {
std::ignore = pushCommand<UpdateColorInfoCommand>(
m_pal, m_selectedColorRow, ox::String{name.data()});
m_pal, m_selectedColorRow, ox::String{name});
}
}