author | leseb <leseb> | 2002-07-10 21:59:27 (UTC) |
---|---|---|
committer | leseb <leseb> | 2002-07-10 21:59:27 (UTC) |
commit | f568737c20bea96fb79d85681a72e142ec05d66f (patch) (side-by-side diff) | |
tree | 80d08b351bbdeec5be93885a4c18ba0207ef990a /noncore/graphics/drawpad/pointtool.cpp | |
parent | 01b04adb73c8bc49938b71a4bebe6fb6a5477f75 (diff) | |
download | opie-f568737c20bea96fb79d85681a72e142ec05d66f.zip opie-f568737c20bea96fb79d85681a72e142ec05d66f.tar.gz opie-f568737c20bea96fb79d85681a72e142ec05d66f.tar.bz2 |
Undo/redo reimplemented
Diffstat (limited to 'noncore/graphics/drawpad/pointtool.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/drawpad/pointtool.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/graphics/drawpad/pointtool.cpp b/noncore/graphics/drawpad/pointtool.cpp index a4f846e..b9b52bc 100644 --- a/noncore/graphics/drawpad/pointtool.cpp +++ b/noncore/graphics/drawpad/pointtool.cpp @@ -33,6 +33,8 @@ PointTool::~PointTool() void PointTool::mousePressEvent(QMouseEvent* e) { + m_pDrawPadCanvas->backupPage(); + m_mousePressed = true; m_polyline[2] = m_polyline[1] = m_polyline[0] = e->pos(); } @@ -42,8 +44,6 @@ void PointTool::mouseReleaseEvent(QMouseEvent* e) Q_UNUSED(e) m_mousePressed = false; - - m_pDrawPadCanvas->backupPage(); } void PointTool::mouseMoveEvent(QMouseEvent* e) @@ -61,7 +61,7 @@ void PointTool::mouseMoveEvent(QMouseEvent* e) r.setBottom(r.bottom() + m_pDrawPad->pen().width()); QPainter painter; - painter.begin(m_pDrawPadCanvas->currentPage()); + painter.begin(m_pDrawPadCanvas->currentPage()->pixmap()); if (m_pDrawPad->antiAliasing()) { QPixmap areaPixmap(r.width(), r.height()); @@ -104,7 +104,7 @@ void PointTool::mouseMoveEvent(QMouseEvent* e) m_pDrawPadCanvas->contentsToViewport(r.bottomRight())); bitBlt(m_pDrawPadCanvas->viewport(), viewportRect.x(), viewportRect.y(), - m_pDrawPadCanvas->currentPage(), r.x(), r.y(), r.width(), r.height()); + m_pDrawPadCanvas->currentPage()->pixmap(), r.x(), r.y(), r.width(), r.height()); m_pDrawPadCanvas->viewport()->update(viewportRect); } |