save work
All checks were successful
Build / build (push) Successful in 1m21s

This commit is contained in:
2025-05-28 23:27:53 -05:00
parent 55ef2cea51
commit 46a51e1209
2 changed files with 20 additions and 12 deletions

View File

@@ -406,9 +406,14 @@ void StudioUI::drawTabs() noexcept {
m_closeActiveTab = false; m_closeActiveTab = false;
} }
if (m_navAction) { if (m_navAction) {
oxLogError(openFile(m_navAction->path)); if (!openFile(m_navAction->path)) {
m_activeEditor->navigateTo(m_navAction->args); m_activeEditor->navigateTo(m_navAction->args);
m_navAction.reset(); m_navAction.reset();
} else {
//auto const i = m_sctx.navIdx - 1;
//oxDebugf("deleting {}", m_sctx.navStack[i].filePath);
//std::ignore = m_sctx.navStack.erase(i);
}
} }
} }
@@ -679,7 +684,10 @@ ox::Error StudioUI::openFile(ox::StringViewCR path) noexcept {
ox::Error StudioUI::openFileActiveTab(ox::StringViewCR path, bool const makeActiveTab) noexcept { ox::Error StudioUI::openFileActiveTab(ox::StringViewCR path, bool const makeActiveTab) noexcept {
if (!m_project) { if (!m_project) {
return ox::Error(1, "No project open to open a file from"); return ox::Error(1, "no project open to open a file from");
}
if (!m_project->romFs().exists(path)) {
return ox::Error{1, "file does note exist"};
} }
if (m_openFiles.contains(path)) { if (m_openFiles.contains(path)) {
for (auto &e : m_editors) { for (auto &e : m_editors) {