quck fixes to issues i noticed while doing a general overview
This commit is contained in:
@@ -175,7 +175,6 @@ namespace anm2ed::imgui
|
||||
{
|
||||
if (!manager.anm2DragDropPopup.is_open()) manager.anm2DragDropPopup.open();
|
||||
|
||||
bool wasOpen = manager.anm2DragDropPopup.is_open();
|
||||
manager.anm2DragDropPopup.trigger();
|
||||
|
||||
if (ImGui::BeginPopupContextWindow(manager.anm2DragDropPopup.label, ImGuiPopupFlags_None))
|
||||
@@ -212,7 +211,7 @@ namespace anm2ed::imgui
|
||||
manager.anm2DragDropPopup.end();
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
else if (wasOpen && !manager.anm2DragDropPopup.is_open())
|
||||
else if (!ImGui::IsPopupOpen(manager.anm2DragDropPopup.label))
|
||||
drag_drop_reset();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -909,8 +909,10 @@ namespace anm2ed::imgui
|
||||
if (shortcut(manager.chords[SHORTCUT_OPEN], shortcut::GLOBAL)) dialog.file_open(dialog::ANM2_OPEN);
|
||||
if (shortcut(manager.chords[SHORTCUT_SAVE], shortcut::GLOBAL))
|
||||
{
|
||||
if (settings.fileIsWarnOverwrite) overwritePopup.open();
|
||||
manager.save();
|
||||
if (settings.fileIsWarnOverwrite)
|
||||
overwritePopup.open();
|
||||
else
|
||||
manager.save();
|
||||
}
|
||||
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;
|
||||
|
||||
@@ -363,8 +363,10 @@ namespace anm2ed::imgui
|
||||
|
||||
if (!isOnlyShowLayers && root.isVisible && animation->rootAnimation.isVisible)
|
||||
{
|
||||
auto rootTransform = baseTransform * math::quad_model_get(TARGET_SIZE, root.position, TARGET_SIZE * 0.5f,
|
||||
math::percent_to_unit(root.scale), root.rotation);
|
||||
auto rootTransform =
|
||||
isRootTransform ? baseTransform * math::quad_model_get(TARGET_SIZE, root.position, TARGET_SIZE * 0.5f,
|
||||
math::percent_to_unit(root.scale), root.rotation)
|
||||
: baseTransform * math::quad_model_get(TARGET_SIZE, {}, TARGET_SIZE * 0.5f);
|
||||
|
||||
vec4 color = isOnionskin ? vec4(colorOffset, alphaOffset) : color::GREEN;
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "timeline.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
|
||||
#include <imgui_internal.h>
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace anm2ed
|
||||
void State::update(SDL_Window*& window, Settings& settings)
|
||||
{
|
||||
SDL_Event event{};
|
||||
bool openDroppedDocumentsImmediately = manager.documents.empty();
|
||||
|
||||
while (SDL_PollEvent(&event))
|
||||
{
|
||||
@@ -46,8 +47,10 @@ namespace anm2ed
|
||||
if (filesystem::path_is_extension(droppedFile, "anm2"))
|
||||
{
|
||||
std::filesystem::path droppedPath{droppedFile};
|
||||
if (manager.documents.empty())
|
||||
if (openDroppedDocumentsImmediately)
|
||||
{
|
||||
manager.open(droppedPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (std::find(manager.anm2DragDropPaths.begin(), manager.anm2DragDropPaths.end(), droppedPath) ==
|
||||
|
||||
Reference in New Issue
Block a user