Global selection and defaultBounds

Dmitry Kazakov dimula73 at gmail.com
Sat Mar 27 18:51:49 CET 2010


Great work!

Can i make a couple of stylish comments? ;)

I think in KisMask::selection()
 {
     if (!m_d->selection) {
+        // FIXME: this violates the const
         m_d->selection = new KisSelection();
+        const KisLayer *parentLayer = qobject_cast<const
KisLayer*>(parent());
+
m_d->selection->setDefaultBounds(KisDefaultBounds(parentLayer->image()));


you can shorten the code a bit:

     if (!m_d->selection) {
+        // FIXME: this violates the const
+         setSelection(new KisSelection());

I don't know whether it would compile due to const problem, just an idea...

And in selectedRect() functions i would use the & operator instead of
intersected() function, just to be more brief. But this is a deal of
taste... =)



On Sat, Mar 27, 2010 at 12:29 PM, Boudewijn Rempt <boud at valdyas.org> wrote:

> On Saturday 27 March 2010, Sven Langkamp wrote:
>
> > The patch fixes the crash on inverting a global or local selection.
>
> Cool work!
> --
> Boudewijn Rempt | http://www.valdyas.org
> _______________________________________________
> kimageshop mailing list
> kimageshop at kde.org
> https://mail.kde.org/mailman/listinfo/kimageshop
>



-- 
Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20100327/6f2ba8bb/attachment.htm 


More information about the kimageshop mailing list