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

This commit is contained in:
2025-05-28 23:27:53 -05:00
parent 9d5915d54a
commit 1ed9949bf3
2 changed files with 20 additions and 12 deletions

View File

@@ -404,9 +404,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);
}
} }
} }
@@ -689,7 +694,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) {

View File

@@ -402,14 +402,14 @@ ox::Error run(Context &ctx) noexcept {
glfwPollEvents(); glfwPollEvents();
auto const ticks = ticksMs(ctx); auto const ticks = ticksMs(ctx);
if (ctx.wakeupTime <= ticks) { if (ctx.wakeupTime <= ticks) {
auto const st = ctx.updateHandler(ctx); auto const st = ctx.updateHandler(ctx);
if (st >= 0) { if (st >= 0) {
ctx.wakeupTime = ticks + static_cast<unsigned>(st); ctx.wakeupTime = ticks + static_cast<unsigned>(st);
sleepTime = static_cast<uint64_t>(st); sleepTime = static_cast<uint64_t>(st);
} else { } else {
ctx.wakeupTime = ~uint64_t{0}; ctx.wakeupTime = ~uint64_t{0};
sleepTime = ctx.wakeupTime - ticks; sleepTime = ctx.wakeupTime - ticks;
} }
} else { } else {
sleepTime = ctx.wakeupTime - ticks; sleepTime = ctx.wakeupTime - ticks;
} }