<div class="gmail_quote">On Sun, Jun 20, 2010 at 1:29 PM, Dmitry Kazakov <span dir="ltr">&lt;<a href="mailto:dimula73@gmail.com">dimula73@gmail.com</a>&gt;</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;">
<br><br><div class="gmail_quote"><div class="im">On Sun, Jun 20, 2010 at 3:18 PM, Sven Langkamp <span dir="ltr">&lt;<a href="mailto:sven.langkamp@gmail.com" target="_blank">sven.langkamp@gmail.com</a>&gt;</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="gmail_quote"><div>On Sun, Jun 20, 2010 at 12:58 PM, Dmitry Kazakov <span dir="ltr">&lt;<a href="mailto:dimula73@gmail.com" target="_blank">dimula73@gmail.com</a>&gt;</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;">


<br>I&#39;ve wrote about this issue: <a href="http://wiki.koffice.org/index.php?title=Krita/KisSelection_Issues" target="_blank">http://wiki.koffice.org/index.php?title=Krita/KisSelection_Issues</a><br><br>Sven, could you comment on it?<br>


</blockquote></div><div><br>I don&#39;t agree. Currently KisSelection is designed to be basically read-only for tools and filters. Inheriting from KisPixelSelection would break that. </div></div></blockquote></div><div><br>
Is it read only? It has public inheritance, so, i guess, it isn&#39;t? At least move() is not hidden.<br></div></div></blockquote><div><br>Move is useless at the moment, because once the projection is updated the move is erase. The function should delegate the move to the included pixel and vector selection. <br>
 </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="gmail_quote"><div>
</div><div class="im"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="gmail_quote"><div>Suddenly it would be possible to edit the KisSelection even though it is just the projection. Additionally selection could be nested, because you could put a KisSelection into a KisSelection. It&#39;s the same the relation as for group layer and normal layers.<br>

</div></div></blockquote></div><div><br>Inheriting KisSelection from KisPixelSelection does not prevent it. Just think like the projection of KisSelection will be stored as a KisPixelSelection object instead of pure KisPaintDevice. Then adding a child KisSelection will fit naturally in it.</div>
</div></blockquote><div><br>It does prevent that KisSelection::setPixelSelection only accepts pixel selection. With KisSelection inheriting KisPixelSelection it would be possible to pass a KisSelection to it. For a projection it makes no difference to store it in a KisPaintDevice or a KisPixelSelection, as the pixel selection only adds methods that you can&#39;t use in the projection anyway.<br>
 </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="gmail_quote"><div> </div><div class="im"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="gmail_quote"><div>
If you want to reduce the code duplication it&#39;s probably better to use a common base class for them.<br></div></div></blockquote></div><div><br>How? Could you describe it a bit? I don&#39;t fully understand.<br clear="all">

</div></div></blockquote></div><br>Both classes share only a few methods that are common to both. At the same time they have lots of stuff that is specific to one of them like updating the projection in KisSelection or manipulation methods in pixel selection. It would make more sense to put the methods that are the same in both classes into a shared base class.<br>