From: giersch Date: Tue, 6 Nov 2007 21:18:45 +0000 (+0000) Subject: . X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/graphlib.git/commitdiff_plain/b90387c5d43606283eaf046eace46c9e4c4e7666 . --- diff --git a/DrawingWindow.cpp b/DrawingWindow.cpp index b60eb06..64508ff 100644 --- a/DrawingWindow.cpp +++ b/DrawingWindow.cpp @@ -189,6 +189,7 @@ void DrawingWindow::closeEvent(QCloseEvent *ev) void DrawingWindow::customEvent(QEvent *) { + d->paintMutex.lock(); d->imageMutex.lock(); if (d->dirtyFlag) { QRect r = d->dirtyRect; @@ -197,7 +198,6 @@ void DrawingWindow::customEvent(QEvent *) repaint(r); } else d->imageMutex.unlock(); - d->paintMutex.lock(); d->paintCondition.wakeAll(); d->paintMutex.unlock(); } diff --git a/test/hello.cpp b/test/hello.cpp index bc1a62e..fe2f2a0 100644 --- a/test/hello.cpp +++ b/test/hello.cpp @@ -152,7 +152,7 @@ void rectangles(DrawingWindow &w) int main(int argc, char *argv[]) { - const int w = 1000; + const int w = 700; const int h = 700; QApplication application(argc, argv);