[studio] Ensure Editor tabs do first draw immediately, fix shift key being missed with tab shortcuts
All checks were successful
Build / build (push) Successful in 3m14s
All checks were successful
Build / build (push) Successful in 3m14s
This commit is contained in:
parent
151d7c5736
commit
3c3d53b40c
@ -83,7 +83,7 @@ StudioUI::StudioUI(turbine::Context &ctx, ox::StringParam projectDataDir) noexce
|
||||
}
|
||||
|
||||
void StudioUI::handleKeyEvent(turbine::Key const key, bool const down) noexcept {
|
||||
for (auto p : m_popups) {
|
||||
for (auto const p : m_popups) {
|
||||
if (p->isOpen()) {
|
||||
if (key == turbine::Key::Escape) {
|
||||
p->close();
|
||||
@ -118,7 +118,7 @@ void StudioUI::draw() noexcept {
|
||||
for (auto &w: m_widgets) {
|
||||
w->draw(m_sctx);
|
||||
}
|
||||
for (auto p: m_popups) {
|
||||
for (auto const p: m_popups) {
|
||||
p->draw(m_sctx);
|
||||
}
|
||||
}
|
||||
@ -207,6 +207,7 @@ void StudioUI::drawTabs() noexcept {
|
||||
studio::editConfig<StudioConfig>(keelCtx(m_ctx), [&](StudioConfig &config) {
|
||||
config.activeTabItemName = m_activeEditor->itemPath();
|
||||
});
|
||||
turbine::setRefreshWithin(m_ctx, 0);
|
||||
} else [[likely]] {
|
||||
if (m_activeEditorUpdatePending == e.get()) [[unlikely]] {
|
||||
m_activeEditorUpdatePending = nullptr;
|
||||
@ -317,7 +318,7 @@ void StudioUI::handleKeyInput() noexcept {
|
||||
} else if (ImGui::IsKeyPressed(ImGuiKey_Z)) {
|
||||
auto const undoStack = m_activeEditor ? m_activeEditor->undoStack() : nullptr;
|
||||
if (undoStack) { oxLogError(undoStack->undo()); }
|
||||
} else if (ImGui::IsKeyPressed(ImGuiKey_1) && ImGui::IsKeyPressed(ImGuiKey_ModShift)) {
|
||||
} else if (ImGui::IsKeyPressed(ImGuiKey_1) && ImGui::IsKeyDown(ImGuiKey_ModShift)) {
|
||||
toggleProjectExplorer();
|
||||
} else {
|
||||
if (!m_editors.empty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user