mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-10 10:13:35 +00:00
Fix critical bug saving files with frame tags without name (fix #1675)
This commit is contained in:
parent
ade32b3247
commit
d36179ae2a
@ -147,7 +147,10 @@ FileOpROI::FileOpROI(const app::Document* doc,
|
||||
if (!sliceName.empty())
|
||||
m_slice = doc->sprite()->slices().getByName(sliceName);
|
||||
|
||||
m_frameTag = doc->sprite()->frameTags().getByName(frameTagName);
|
||||
// Don't allow exporting frame tags with empty names
|
||||
if (!frameTagName.empty())
|
||||
m_frameTag = doc->sprite()->frameTags().getByName(frameTagName);
|
||||
|
||||
if (m_frameTag) {
|
||||
if (m_selFrames.empty())
|
||||
m_selFrames.insert(m_frameTag->fromFrame(), m_frameTag->toFrame());
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2016-2017 David Capello
|
||||
// Copyright (C) 2016-2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
// the End-User License Agreement for Aseprite.
|
||||
@ -85,6 +85,10 @@ void fill_frames_combobox(const doc::Sprite* sprite, ui::ComboBox* frames, const
|
||||
frames->setSelectedItemIndex(i);
|
||||
|
||||
for (auto tag : sprite->frameTags()) {
|
||||
// Don't allow to select empty frame tags
|
||||
if (tag->name().empty())
|
||||
continue;
|
||||
|
||||
i = frames->addItem(new FrameListItem(tag));
|
||||
if (defFrame == tag->name())
|
||||
frames->setSelectedItemIndex(i);
|
||||
|
Loading…
x
Reference in New Issue
Block a user