mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-01 01:20:25 +00:00
Use selection bounds if they're visible on ImportSpriteSheet by default
This commit is contained in:
parent
df33744c85
commit
7c8153b5ec
@ -1,5 +1,5 @@
|
|||||||
// Aseprite
|
// Aseprite
|
||||||
// Copyright (C) 2019-2021 Igara Studio S.A.
|
// Copyright (C) 2019-2022 Igara Studio S.A.
|
||||||
// Copyright (C) 2001-2018 David Capello
|
// Copyright (C) 2001-2018 David Capello
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
@ -283,8 +283,12 @@ private:
|
|||||||
sheetType()->setSelectedItemIndex((int)app::SpriteSheetType::Rows-1);
|
sheetType()->setSelectedItemIndex((int)app::SpriteSheetType::Rows-1);
|
||||||
|
|
||||||
gfx::Rect defBounds = m_docPref->importSpriteSheet.bounds();
|
gfx::Rect defBounds = m_docPref->importSpriteSheet.bounds();
|
||||||
if (defBounds.isEmpty())
|
if (defBounds.isEmpty()) {
|
||||||
defBounds = m_document->sprite()->gridBounds();
|
if (m_document->isMaskVisible())
|
||||||
|
defBounds = m_document->mask()->bounds();
|
||||||
|
else
|
||||||
|
defBounds = m_document->sprite()->gridBounds();
|
||||||
|
}
|
||||||
onChangeRectangle(defBounds);
|
onChangeRectangle(defBounds);
|
||||||
|
|
||||||
gfx::Size defPaddingBounds = m_docPref->importSpriteSheet.paddingBounds();
|
gfx::Size defPaddingBounds = m_docPref->importSpriteSheet.paddingBounds();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user