author | leseb <leseb> | 2002-07-10 21:59:27 (UTC) |
---|---|---|
committer | leseb <leseb> | 2002-07-10 21:59:27 (UTC) |
commit | f568737c20bea96fb79d85681a72e142ec05d66f (patch) (unidiff) | |
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() | |||
33 | 33 | ||
34 | void PointTool::mousePressEvent(QMouseEvent* e) | 34 | void PointTool::mousePressEvent(QMouseEvent* e) |
35 | { | 35 | { |
36 | m_pDrawPadCanvas->backupPage(); | ||
37 | |||
36 | m_mousePressed = true; | 38 | m_mousePressed = true; |
37 | m_polyline[2] = m_polyline[1] = m_polyline[0] = e->pos(); | 39 | m_polyline[2] = m_polyline[1] = m_polyline[0] = e->pos(); |
38 | } | 40 | } |
@@ -42,8 +44,6 @@ void PointTool::mouseReleaseEvent(QMouseEvent* e) | |||
42 | Q_UNUSED(e) | 44 | Q_UNUSED(e) |
43 | 45 | ||
44 | m_mousePressed = false; | 46 | m_mousePressed = false; |
45 | |||
46 | m_pDrawPadCanvas->backupPage(); | ||
47 | } | 47 | } |
48 | 48 | ||
49 | void PointTool::mouseMoveEvent(QMouseEvent* e) | 49 | void PointTool::mouseMoveEvent(QMouseEvent* e) |
@@ -61,7 +61,7 @@ void PointTool::mouseMoveEvent(QMouseEvent* e) | |||
61 | r.setBottom(r.bottom() + m_pDrawPad->pen().width()); | 61 | r.setBottom(r.bottom() + m_pDrawPad->pen().width()); |
62 | 62 | ||
63 | QPainter painter; | 63 | QPainter painter; |
64 | painter.begin(m_pDrawPadCanvas->currentPage()); | 64 | painter.begin(m_pDrawPadCanvas->currentPage()->pixmap()); |
65 | 65 | ||
66 | if (m_pDrawPad->antiAliasing()) { | 66 | if (m_pDrawPad->antiAliasing()) { |
67 | QPixmap areaPixmap(r.width(), r.height()); | 67 | QPixmap areaPixmap(r.width(), r.height()); |
@@ -104,7 +104,7 @@ void PointTool::mouseMoveEvent(QMouseEvent* e) | |||
104 | m_pDrawPadCanvas->contentsToViewport(r.bottomRight())); | 104 | m_pDrawPadCanvas->contentsToViewport(r.bottomRight())); |
105 | 105 | ||
106 | bitBlt(m_pDrawPadCanvas->viewport(), viewportRect.x(), viewportRect.y(), | 106 | bitBlt(m_pDrawPadCanvas->viewport(), viewportRect.x(), viewportRect.y(), |
107 | m_pDrawPadCanvas->currentPage(), r.x(), r.y(), r.width(), r.height()); | 107 | m_pDrawPadCanvas->currentPage()->pixmap(), r.x(), r.y(), r.width(), r.height()); |
108 | 108 | ||
109 | m_pDrawPadCanvas->viewport()->update(viewportRect); | 109 | m_pDrawPadCanvas->viewport()->update(viewportRect); |
110 | } | 110 | } |