mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-17 13:20:45 +00:00
Fix brush preview hiding from secondary editors when we change the current frame
This commit is contained in:
parent
75a743f141
commit
953a626425
@ -192,7 +192,8 @@ void BrushPreview::show(const gfx::Point& screenPos)
|
||||
}
|
||||
|
||||
document->notifySpritePixelsModified(
|
||||
sprite, gfx::Region(m_lastBounds = brushBounds), site.frame());
|
||||
sprite, gfx::Region(m_lastBounds = brushBounds),
|
||||
m_lastFrame = site.frame());
|
||||
|
||||
m_withRealPreview = true;
|
||||
}
|
||||
@ -246,11 +247,9 @@ void BrushPreview::hide()
|
||||
|
||||
// Clean pixel/brush preview
|
||||
if (m_withRealPreview) {
|
||||
frame_t frame = document->getExtraCel()->frame();
|
||||
|
||||
document->destroyExtraCel();
|
||||
document->notifySpritePixelsModified(
|
||||
sprite, gfx::Region(m_lastBounds), frame);
|
||||
sprite, gfx::Region(m_lastBounds), m_lastFrame);
|
||||
|
||||
m_withRealPreview = false;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
#include "base/shared_ptr.h"
|
||||
#include "doc/color.h"
|
||||
#include "doc/frame.h"
|
||||
#include "doc/mask_boundaries.h"
|
||||
#include "gfx/color.h"
|
||||
#include "gfx/point.h"
|
||||
@ -102,7 +103,10 @@ namespace app {
|
||||
gfx::Region m_clippingRegion;
|
||||
gfx::Region m_oldClippingRegion;
|
||||
|
||||
// Information stored in show() and used in hide() to clear the
|
||||
// brush preview in the exact same place.
|
||||
gfx::Rect m_lastBounds;
|
||||
doc::frame_t m_lastFrame;
|
||||
};
|
||||
|
||||
class HideBrushPreview {
|
||||
|
Loading…
x
Reference in New Issue
Block a user