mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 06:32:42 +00:00
Fix bug in UndoTransaction::clearMask(): clear all the image is the mask isn't empty but is hidden.
This commit is contained in:
parent
096f31b551
commit
1526e30f4c
@ -995,10 +995,10 @@ void UndoTransaction::clearMask(int bgcolor)
|
||||
|
||||
Mask* mask = m_document->getMask();
|
||||
|
||||
// if the mask is empty then we have to clear the entire image
|
||||
// in the cel
|
||||
if (mask->is_empty()) {
|
||||
// if the layer is the background then we clear the image
|
||||
// If the mask is empty or is not visible then we have to clear the
|
||||
// entire image in the cel.
|
||||
if (!m_document->isMaskVisible()) {
|
||||
// If the layer is the background then we clear the image.
|
||||
if (m_sprite->getCurrentLayer()->is_background()) {
|
||||
if (isEnabled())
|
||||
m_undoHistory->pushUndoer(new undoers::ImageArea(m_undoHistory->getObjects(),
|
||||
@ -1007,8 +1007,8 @@ void UndoTransaction::clearMask(int bgcolor)
|
||||
// clear all
|
||||
image_clear(image, bgcolor);
|
||||
}
|
||||
// if the layer is transparent we can remove the cel (and its
|
||||
// associated image)
|
||||
// If the layer is transparent we can remove the cel (and its
|
||||
// associated image).
|
||||
else {
|
||||
removeCel(static_cast<LayerImage*>(m_sprite->getCurrentLayer()), cel);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user