summaryrefslogtreecommitdiff
authorleseb <leseb>2002-04-10 09:09:18 (UTC)
committer leseb <leseb>2002-04-10 09:09:18 (UTC)
commitef60c3e367a4ce89367ad6f5c035134bef6602a6 (patch) (side-by-side diff)
treefe9560f1b3a8c1035808e5010ec6c157bda929c5
parent4eb2a1b8698fdcca7a2c74a3fe9a88a297607754 (diff)
downloadopie-ef60c3e367a4ce89367ad6f5c035134bef6602a6.zip
opie-ef60c3e367a4ce89367ad6f5c035134bef6602a6.tar.gz
opie-ef60c3e367a4ce89367ad6f5c035134bef6602a6.tar.bz2
Fix flickering when using tools
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/drawpad/drawpadcanvas.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/graphics/drawpad/drawpadcanvas.cpp b/noncore/graphics/drawpad/drawpadcanvas.cpp
index 3ddd7b7..58192d3 100644
--- a/noncore/graphics/drawpad/drawpadcanvas.cpp
+++ b/noncore/graphics/drawpad/drawpadcanvas.cpp
@@ -140,48 +140,50 @@ bool DrawPadCanvasXmlHandler::characters(const QString& ch)
}
QByteArray byteArrayUnzipped(m_dataLenght);
::uncompress((uchar*)byteArrayUnzipped.data(), &m_dataLenght, (uchar*)byteArray.data(), byteArray.size());
image.loadFromData((const uchar*)byteArrayUnzipped.data(), m_dataLenght, m_dataFormat);
} else {
image.loadFromData((const uchar*)byteArray.data(), m_dataLenght, m_dataFormat);
}
QPixmap* pixmap = new QPixmap(image.width(), image.height());
pixmap->convertFromImage(image);
m_pixmaps.append(pixmap);
}
return true;
}
DrawPadCanvas::DrawPadCanvas(DrawPad* drawPad, QWidget* parent, const char* name)
: QScrollView(parent, name)
{
m_pDrawPad = drawPad;
m_pages.setAutoDelete(true);
m_pageBackups.setAutoDelete(true);
+
+ viewport()->setBackgroundMode(QWidget::NoBackground);
}
DrawPadCanvas::~DrawPadCanvas()
{
}
void DrawPadCanvas::load(QIODevice* ioDevice)
{
QTextStream textStream(ioDevice);
textStream.setCodec(QTextCodec::codecForName("UTF-8"));
QXmlInputSource xmlInputSource(textStream);
QXmlSimpleReader xmlSimpleReader;
DrawPadCanvasXmlHandler drawPadCanvasXmlHandler;
xmlSimpleReader.setContentHandler(&drawPadCanvasXmlHandler);
xmlSimpleReader.parse(xmlInputSource);
m_pages = drawPadCanvasXmlHandler.pixmaps();
if (m_pages.isEmpty()) {
m_pages.append(new QPixmap(contentsRect().size()));
m_pages.current()->fill(Qt::white);
}