[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: koffice/libs/flake
From: Thomas Zander <zander () kde ! org>
Date: 2007-11-25 11:30:40
Message-ID: 200711251230.40560.zander () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
[Attachment #4 (multipart/mixed)]
On Sunday 25 November 2007 12:03:51 jaham wrote:
> On Sunday 25 November 2007 08:59:52 Thorsten Zachmann wrote:
> > Hello Jan,
> >
> > > SVN commit 740935 by jaham:
> > >
> > > Some default tool option widget goodness. One can now select the
> > > corner of the selection for which to change the position. The
> > > selected corner is highlighted by the selection decorator for
> > > better user feedback as the corners can be at quite different
> > > positions if the selection is transformed.
> >
> > cool.
> >
> :-)
> :
> > There is a small problem with the position of the highlighted
> > position after you undo a resize, rotate and so on.
>
> Yeah i know. That problem we have all over the place. There is atm no
> way to know when a command was undone. :-( Do you know how to make this
> work?
Good point; we basically need a notifycation from the data model that a
shape has been changed so the view (widgets) can update their data.
Can you try the attached patch? If you then connect to the
KoShapeManager::selectionContentChanged() signal you should be able to
fix the problem.
Let me know.
--
Thomas Zander
["notifyView.diff" (text/x-diff)]
Index: libs/flake/KoShapeManager.h
===================================================================
--- libs/flake/KoShapeManager.h (revision 741270)
+++ libs/flake/KoShapeManager.h (working copy)
@@ -192,6 +192,8 @@
signals:
/// emitted when the selection is changed
void selectionChanged();
+ /// emitted when an object in the selection is changed (moved/rotated etc)
+ void selectionContentChanged();
private:
class Private;
Index: libs/flake/KoShapeManager.cpp
===================================================================
--- libs/flake/KoShapeManager.cpp (revision 741270)
+++ libs/flake/KoShapeManager.cpp (working copy)
@@ -384,9 +384,11 @@
QList<KoShape*> shapesWithCollisionDetection;
};
DetectCollision detector;
+ bool selectionModified = false;
foreach ( KoShape *shape, d->aggregate4update ) {
if(d->shapeIndexesBeforeUpdate.contains(shape))
detector.detect(d->tree, shape, d->shapeIndexesBeforeUpdate[shape]);
+ selectionModified = selectionModified || d->selection()->isSelected(shape);
}
foreach ( KoShape * shape, d->aggregate4update )
@@ -409,6 +411,8 @@
d->shapeIndexesBeforeUpdate.clear();
detector.fireSignals();
+ if (selectionModified)
+ emit selectionContentChanged();
}
const QList<KoShape *> & KoShapeManager::shapes() const {
[Attachment #8 (application/pgp-signature)]
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic