Global selection and defaultBounds
Sven Langkamp
sven.langkamp at gmail.com
Sat Mar 27 18:56:17 CET 2010
On Sat, Mar 27, 2010 at 6:51 PM, Dmitry Kazakov <dimula73 at gmail.com> wrote:
> 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...
>
It wouldn't compile because of the const.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20100327/b08fb721/attachment.htm
More information about the kimageshop
mailing list