some bullshit to fix potential crash
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user