some bullshit to fix potential crash

This commit is contained in:
2026-05-14 22:58:32 -04:00
parent 8f72f0aef5
commit b7b49eb81e
6 changed files with 89 additions and 12 deletions
+18 -4
View File
@@ -1132,10 +1132,24 @@ namespace anm2ed::imgui
}
}
if (isLeftPressed) frame_change_apply({.scaleX = step}, anm2::SUBTRACT);
if (isRightPressed) frame_change_apply({.scaleX = step}, anm2::ADD);
if (isUpPressed) frame_change_apply({.scaleY = step}, anm2::SUBTRACT);
if (isDownPressed) frame_change_apply({.scaleY = step}, anm2::ADD);
if (isSelectedNullRect)
{
if (isLeftPressed)
frame_change_apply({.positionX = step * 0.5f, .scaleX = step}, anm2::SUBTRACT);
if (isRightPressed)
frame_change_apply({.positionX = step * 0.5f, .scaleX = step}, anm2::ADD);
if (isUpPressed)
frame_change_apply({.positionY = step * 0.5f, .scaleY = step}, anm2::SUBTRACT);
if (isDownPressed)
frame_change_apply({.positionY = step * 0.5f, .scaleY = step}, anm2::ADD);
}
else
{
if (isLeftPressed) frame_change_apply({.scaleX = step}, anm2::SUBTRACT);
if (isRightPressed) frame_change_apply({.scaleX = step}, anm2::ADD);
if (isUpPressed) frame_change_apply({.scaleY = step}, anm2::SUBTRACT);
if (isDownPressed) frame_change_apply({.scaleY = step}, anm2::ADD);
}
if (isToolDuring)
{
-1
View File
@@ -491,7 +491,6 @@ namespace anm2ed::imgui
if (!animation) return;
if (auto item = animation->item_get(reference.itemType, reference.itemID))
{
document.snapshot(localize.get(EDIT_PASTE_FRAMES));
std::set<int> indices{};
std::string errorString{};
int insertIndex = (int)item->frames.size();