mirror of
https://github.com/aseprite/aseprite.git
synced 2024-10-06 06:50:07 +00:00
Fix unnecessary warning saving TGA (fix #1830)
This commit is contained in:
parent
ddd7140841
commit
b3eba1c952
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2018 Igara Studio S.A.
|
||||
// Copyright (C) 2018-2019 Igara Studio S.A.
|
||||
// Copyright (C) 2001-2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -432,6 +432,9 @@ FileOp* FileOp::createSaveDocumentOperation(const Context* context,
|
||||
|
||||
// Palette with alpha
|
||||
if (!fop->m_format->support(FILE_SUPPORT_PALETTE_WITH_ALPHA)) {
|
||||
if (!fop->m_format->support(FILE_SUPPORT_RGBA) ||
|
||||
!fop->m_format->support(FILE_SUPPORT_INDEXED) ||
|
||||
fop->document()->colorMode() == ColorMode::INDEXED) {
|
||||
bool done = false;
|
||||
for (const Palette* pal : fop->m_document->sprite()->getPalettes()) {
|
||||
for (int c=0; c<pal->size(); ++c) {
|
||||
@ -445,6 +448,7 @@ FileOp* FileOp::createSaveDocumentOperation(const Context* context,
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Show the confirmation alert
|
||||
if (!warnings.empty()) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (c) 2018 Igara Studio S.A.
|
||||
// Copyright (c) 2018-2019 Igara Studio S.A.
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
// the End-User License Agreement for Aseprite.
|
||||
@ -56,7 +56,8 @@ class SvgFormat : public FileFormat {
|
||||
FILE_SUPPORT_GRAYA |
|
||||
FILE_SUPPORT_INDEXED |
|
||||
FILE_SUPPORT_SEQUENCES |
|
||||
FILE_SUPPORT_GET_FORMAT_OPTIONS;
|
||||
FILE_SUPPORT_GET_FORMAT_OPTIONS |
|
||||
FILE_SUPPORT_PALETTE_WITH_ALPHA;
|
||||
}
|
||||
|
||||
bool onLoad(FileOp* fop) override;
|
||||
|
Loading…
Reference in New Issue
Block a user