Fixed random crashing issue

This commit is contained in:
2026-01-02 03:42:43 -05:00
parent 95b441c4cf
commit a8143b6d0c
7 changed files with 9 additions and 6 deletions

View File

@@ -14,6 +14,7 @@ namespace anm2ed::imgui
auto viewport = ImGui::GetMainViewport();
auto windowHeight = viewport->Size.y - taskbar.height - documents.height;
if (windowHeight < 1.0f) windowHeight = 1.0f;
ImGui::SetNextWindowViewport(viewport->ID);
ImGui::SetNextWindowPos(ImVec2(viewport->Pos.x, viewport->Pos.y + taskbar.height + documents.height));

View File

@@ -237,4 +237,4 @@ namespace anm2ed::imgui
if (shortcut(manager.chords[SHORTCUT_SAVE_AS], shortcut::GLOBAL)) dialog.file_save(Dialog::ANM2_SAVE);
if (shortcut(manager.chords[SHORTCUT_EXIT], shortcut::GLOBAL)) isQuitting = true;
}
}
}

View File

@@ -898,14 +898,11 @@ namespace anm2ed::imgui
ImGui::EndPopup();
}
ImGui::End();
manager.progressPopup.trigger();
if (ImGui::BeginPopupModal(manager.progressPopup.label(), &manager.progressPopup.isOpen, ImGuiWindowFlags_NoResize))
{
if (!animation) return;
auto& start = manager.recordingStart;
auto& end = manager.recordingEnd;
auto progress = (playback.time - start) / (end - start);
@@ -946,5 +943,6 @@ namespace anm2ed::imgui
}
settings.previewStartZoom = zoom;
ImGui::End();
}
}

View File

@@ -466,7 +466,7 @@ namespace anm2ed::imgui
ImGui::EndPopup();
}
ImGui::End();
}
ImGui::End();
}
}

View File

@@ -518,7 +518,6 @@ namespace anm2ed::imgui
ImGui::EndPopup();
}
ImGui::End();
if (!document.isSpritesheetEditorSet)
{
@@ -532,5 +531,6 @@ namespace anm2ed::imgui
settings.editorSize = size;
settings.editorStartZoom = zoom;
ImGui::End();
}
}

View File

@@ -14,6 +14,8 @@ namespace anm2ed::imgui
{
auto viewport = ImGui::GetMainViewport();
auto windowHeight = viewport->Size.y - taskbar.height - documents.height;
if (windowHeight < 1.0f)
windowHeight = 1.0f;
ImGui::SetNextWindowViewport(viewport->ID);
ImGui::SetNextWindowPos(ImVec2(viewport->Pos.x, viewport->Pos.y + taskbar.height + documents.height));

View File

@@ -2,6 +2,8 @@
#include <algorithm>
#include <imgui/imgui_internal.h>
#include <imgui/backends/imgui_impl_opengl3.h>
#include <imgui/backends/imgui_impl_sdl3.h>