This commit is contained in:
@@ -404,9 +404,14 @@ void StudioUI::drawTabs() noexcept {
|
||||
m_closeActiveTab = false;
|
||||
}
|
||||
if (m_navAction) {
|
||||
oxLogError(openFile(m_navAction->path));
|
||||
if (!openFile(m_navAction->path)) {
|
||||
m_activeEditor->navigateTo(m_navAction->args);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -689,7 +694,10 @@ ox::Error StudioUI::openFile(ox::StringViewCR path) noexcept {
|
||||
|
||||
ox::Error StudioUI::openFileActiveTab(ox::StringViewCR path, bool const makeActiveTab) noexcept {
|
||||
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)) {
|
||||
for (auto &e : m_editors) {
|
||||
|
Reference in New Issue
Block a user