<br><br><div class="gmail_quote">On Sat, Mar 27, 2010 at 8:56 PM, Sven Langkamp <span dir="ltr"><<a href="mailto:sven.langkamp@gmail.com">sven.langkamp@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"><div class="gmail_quote">On Sat, Mar 27, 2010 at 6:51 PM, Dmitry Kazakov <span dir="ltr"><<a href="mailto:dimula73@gmail.com" target="_blank">dimula73@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Great work!<br><br>Can i make a couple of stylish comments? ;)<br><br>I think in KisMask::selection()<br> {<br> if (!m_d->selection) {<br>+ // FIXME: this violates the const<br> m_d->selection = new KisSelection();<br>
+ const KisLayer *parentLayer = qobject_cast<const KisLayer*>(parent());<br>+ m_d->selection->setDefaultBounds(KisDefaultBounds(parentLayer->image()));<br><br><br>you can shorten the code a bit:<br>
<br> if (!m_d->selection) {<br>
+ // FIXME: this violates the const<br>+
setSelection(new KisSelection());<br><br>I don't know whether it would compile due to const problem, just an idea...<br></blockquote></div><br></div>It wouldn't compile because of the const.<br></blockquote><div>
<br>ok. Why do we use const here? Is it inherited method?<br></div></div><br clear="all"><br>-- <br>Dmitry Kazakov<br>