Fix brush boundaries glitches in extreme cases

We this commit we don't share saved pixels information between
different BrushPreview instances.

If we pressed E key to swich to the eraser tool, and kept it pressed,
moving the mouse cursor over different editors produced invalid restored
pixels.
This commit is contained in:
David Capello 2015-08-12 15:07:32 -03:00
parent 4c54c62644
commit c9ed7bf868
2 changed files with 3 additions and 7 deletions

View File

@ -39,10 +39,6 @@ namespace app {
using namespace doc;
std::vector<gfx::Color> BrushPreview::m_savedPixels;
int BrushPreview::m_savedPixelsIterator;
int BrushPreview::m_savedPixelsLimit;
BrushPreview::BrushPreview(Editor* editor)
: m_editor(editor)
, m_type(CROSS)

View File

@ -95,9 +95,9 @@ namespace app {
int m_brushWidth;
int m_brushHeight;
static std::vector<gfx::Color> m_savedPixels;
static int m_savedPixelsIterator;
static int m_savedPixelsLimit;
std::vector<gfx::Color> m_savedPixels;
int m_savedPixelsIterator;
int m_savedPixelsLimit;
gfx::Region m_clippingRegion;
gfx::Region m_oldClippingRegion;