summaryrefslogtreecommitdiff
path: root/noncore/graphics
Unidiff
Diffstat (limited to 'noncore/graphics') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/drawpad/filltool.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/noncore/graphics/drawpad/filltool.cpp b/noncore/graphics/drawpad/filltool.cpp
index 2a39d04..b47aa60 100644
--- a/noncore/graphics/drawpad/filltool.cpp
+++ b/noncore/graphics/drawpad/filltool.cpp
@@ -33,12 +33,17 @@ FillTool::~FillTool()
33void FillTool::mousePressEvent(QMouseEvent* e) 33void FillTool::mousePressEvent(QMouseEvent* e)
34{ 34{
35 int x = e->x(); 35 int x = e->x();
36 int y = e->y(); 36 int y = e->y();
37 37
38 m_image = m_pDrawPadCanvas->currentPage()->pixmap()->convertToImage(); 38 m_image = m_pDrawPadCanvas->currentPage()->pixmap()->convertToImage();
39
40 if (m_image.depth() <= 8) {
41 m_image = m_image.convertDepth(32);
42 }
43
39 m_fillRgb = m_pDrawPad->brush().color().rgb(); 44 m_fillRgb = m_pDrawPad->brush().color().rgb();
40 m_oldRgb = m_image.pixel(x, y); 45 m_oldRgb = m_image.pixel(x, y);
41 46
42 if (m_oldRgb != m_fillRgb) { 47 if (m_oldRgb != m_fillRgb) {
43 m_pDrawPadCanvas->backupPage(); 48 m_pDrawPadCanvas->backupPage();
44 49