[nostalgia/studio] Fix closing of file dialog not to change cursor

This commit is contained in:
Gary Talent 2022-01-30 02:45:07 -06:00
parent 35433563c6
commit 87c03c0d98

View File

@ -2,8 +2,6 @@
* Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved. * Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/ */
#include <imgui.h>
#include <nostalgia/core/gfx.hpp> #include <nostalgia/core/gfx.hpp>
#include "filedialogmanager.hpp" #include "filedialogmanager.hpp"
@ -15,8 +13,6 @@ studio::TaskState FileDialogManager::update(core::Context *ctx) noexcept {
case UpdateProjectPathState::EnableSystemCursor: { case UpdateProjectPathState::EnableSystemCursor: {
// switch to system cursor in this update and open file dialog in the next // switch to system cursor in this update and open file dialog in the next
// the cursor state has to be set before the ImGui frame starts // the cursor state has to be set before the ImGui frame starts
auto &io = ImGui::GetIO();
io.MouseDrawCursor = false;
m_state = UpdateProjectPathState::RunFileDialog; m_state = UpdateProjectPathState::RunFileDialog;
break; break;
} }
@ -29,8 +25,6 @@ studio::TaskState FileDialogManager::update(core::Context *ctx) noexcept {
err = pathChosen.emitCheckError(path); err = pathChosen.emitCheckError(path);
oxAssert(err, "Path chosen response failed"); oxAssert(err, "Path chosen response failed");
} }
auto &io = ImGui::GetIO();
io.MouseDrawCursor = true;
m_state = UpdateProjectPathState::None; m_state = UpdateProjectPathState::None;
return nostalgia::studio::TaskState::Done; return nostalgia::studio::TaskState::Done;
} }