[nostalgia,studio] Fix crash that occurred when navigating to file that is not already open
All checks were successful
Build / build (push) Successful in 2m0s

This commit is contained in:
2025-02-20 23:57:02 -06:00
parent 77d526d6ac
commit 49cc2f492a
4 changed files with 20 additions and 10 deletions

View File

@@ -566,8 +566,10 @@ void TileSheetEditorImGui::drawPaletteMenu() noexcept {
m_view.setPalIdx(i);
}
if (ImGui::IsItemHovered() && ImGui::IsMouseDoubleClicked(0)) {
auto const rqst = ox::sfmt<ox::BasicString<100>>("{};{}", i, m_model.palettePage());
oxLogError(studio::navigateTo(m_sctx, m_model.palPath(), rqst));
studio::navigateTo(
m_sctx,
m_model.palPath(),
ox::sfmt("{};{}", i, m_model.palettePage()));
}
// Column: color RGB
ImGui::TableNextColumn();