[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/office/flake
From: Thomas Zander <zander () kde ! org>
Date: 2006-05-07 17:40:05
Message-ID: 1147023605.219526.4025.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 538377 by zander:
* Fix various repainting options
M +1 -1 lib/KoShape.cpp
M +1 -1 lib/KoShape.h
M +6 -0 lib/KoShapeContainer.cpp
M +2 -0 lib/KoShapeContainer.h
M +5 -2 testapp/mainwindow.cpp
--- trunk/playground/office/flake/lib/KoShape.cpp #538376:538377
@@ -214,7 +214,7 @@
}
void KoShape::repaint() const {
- if(m_repaintManager == 0 || !isVisible())
+ if(m_repaintManager == 0)
return;
QRectF rect(m_matrix.mapRect(QRectF(QPointF(0, 0), m_size)));
m_repaintManager->repaint(rect, this, true);
--- trunk/playground/office/flake/lib/KoShape.h #538376:538377
@@ -279,7 +279,7 @@
* <p>This method will return immediately and only request a repaint. Successive calls
* will be merged into an appropriate repaint action.
*/
- void repaint() const;
+ virtual void repaint() const;
/**
* Request a repaint to be queued.
--- trunk/playground/office/flake/lib/KoShapeContainer.cpp #538376:538377
@@ -180,7 +180,13 @@
Q_UNUSED(container);
}
+void KoShapeContainer::repaint() const {
+ KoShape::repaint();
+ foreach ( KoShape *shape, m_children->iterator())
+ shape->repaint();
+}
+
// ## inner class KoGraphicsContainerModel::Relation
KoShapeContainer::ChildrenData::Relation::Relation(KoShape *child)
:m_inside(false)
--- trunk/playground/office/flake/lib/KoShapeContainer.h #538376:538377
@@ -180,6 +180,8 @@
*/
virtual void paintComponent(QPainter &painter, KoViewConverter &converter) = 0;
+ void repaint() const;
+
private:
/**
*/
--- trunk/playground/office/flake/testapp/mainwindow.cpp #538376:538377
@@ -172,18 +172,21 @@
foreach ( KoShape * shape, m_shapeManager->selection()->selectedObjects() ) {
if(shape->parent())
shape->parent()->setClipping(shape, clipped == Qt::Checked);
+ shape->repaint();
}
}
void FlakeCanvas::setLocked(int locked) {
if(locked == Qt::PartiallyChecked) return;
- foreach ( KoShape * shape, m_shapeManager->selection()->selectedObjects() )
+ foreach ( KoShape * shape, m_shapeManager->selection()->selectedObjects() ) {
shape->setLocked(locked == Qt::Checked);
-
+ shape->repaint();
+ }
}
void FlakeCanvas::setVisible(int visible) {
if(visible == Qt::PartiallyChecked) return;
foreach ( KoShape * shape, m_shapeManager->selection()->selectedObjects() ) {
+ shape->repaint();
shape->setVisible(visible == Qt::Checked);
shape->repaint();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic