Diffstat (limited to 'noncore/graphics/drawpad/texttool.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/graphics/drawpad/texttool.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/graphics/drawpad/texttool.cpp b/noncore/graphics/drawpad/texttool.cpp index 34c8a76..9037abd 100644 --- a/noncore/graphics/drawpad/texttool.cpp +++ b/noncore/graphics/drawpad/texttool.cpp @@ -53,21 +53,21 @@ TextTool::~TextTool() void TextTool::mousePressEvent(QMouseEvent* e) { TextToolDialog textToolDialog(m_pDrawPad); if (textToolDialog.exec() == QDialog::Accepted && !textToolDialog.text().isEmpty()) { + m_pDrawPadCanvas->backupPage(); + QPainter painter; - painter.begin(m_pDrawPadCanvas->currentPage()); + painter.begin(m_pDrawPadCanvas->currentPage()->pixmap()); painter.setPen(m_pDrawPad->pen()); painter.drawText(e->x(), e->y(), textToolDialog.text()); painter.end(); m_pDrawPadCanvas->viewport()->update(); - - m_pDrawPadCanvas->backupPage(); } } void TextTool::mouseReleaseEvent(QMouseEvent* e) { Q_UNUSED(e) |