Commit b1e3a59f authored by Thorsten Zachmann's avatar Thorsten Zachmann
Browse files

o trigger a repaint when a shape is removed

o clear selection when new shapes are set

svn path=/trunk/koffice/; revision=616193
parent 33d98866
......@@ -63,6 +63,8 @@ KoShapeManager::~KoShapeManager()
void KoShapeManager::setShapes( const QList<KoShape *> &shapes )
{
//clear selection
m_selection->deselectAll();
foreach(KoShape *shape, m_shapes)
{
m_aggregate4update.remove( shape );
......@@ -92,6 +94,7 @@ void KoShapeManager::add( KoShape *shape )
void KoShapeManager::remove( KoShape *shape )
{
shape->repaint();
shape->removeShapeManager( this );
m_selection->deselect( shape );
m_aggregate4update.remove( shape );
......@@ -102,8 +105,8 @@ void KoShapeManager::remove( KoShape *shape )
void KoShapeManager::paint( QPainter &painter, const KoViewConverter &converter, bool forPrint)
{
updateTree();
QPen pen(Qt::NoPen); // painters by default have a black stroke, lets turn that off.
painter.setPen(pen);
painter.setPen( Qt::NoPen );// painters by default have a black stroke, lets turn that off.
painter.setBrush( Qt::NoBrush );
QList<KoShape*> sortedShapes( m_tree.intersects( converter.viewToDocument( painter.clipRegion().boundingRect() ) ) );
qSort(sortedShapes.begin(), sortedShapes.end(), KoShape::compareShapeZIndex);
const QRegion clipRegion = painter.clipRegion();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment