Hi Alexey,<br><br>Pl. find the updated patch, sorry it took a month :D<br>Also find my comments inlined below.<br><br>Rgds<br>-Abhi<br><br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">== List of easily detectable bugs ==<br>
<br>
1. Open popup menu with right click then click somewhere on the map to close<br>
it. In about half of cases rectangle appears.<br>
<br></blockquote><div>Fixed. <br></div><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2. Once mouse cursor is moved away from skymap rectangle is stuck.<br></blockquote><div>I didn&#39;t notice this after fixing issue mentioned in 1.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
== Comments ==<br>
<br>
1, I think there is no need store SkyPoints for rectangle angles inside of<br>
SkyMap. It&#39;s better to calculate them from scree coordinates when mouse button<br>
is released and pass them into showObjectsInRect as parameters.<br>
<br></blockquote><div>But I think we&#39;ll still have to store first right click position (into firstRClickPos) <br></div><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

2. instead of scary ladder of ifs in mouseMoveEvents you can use following<br>
code (if I get you intent correctly)<br>
&gt; FindObjectsRect = QRect( firstRClickPos, e-&gt;pos() ).normalized();<br>
&gt; update();<br>
Much shorter and easier to understand.<br></blockquote><div>Yes, thanks for this comment, I tried this instead of the ladder and it works.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
== Minor notes ==<br>
* QRect in drawBox should be passed as const reference.</blockquote><div>Did this change <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
* There is function QPainter::drawRect(const QRect&amp;).<br></blockquote><div>In the drawBox() implementation, modified the call p.drawRect( box.x(), box.y()... ) with the above i.e. p.drawRect(box)<br><br> <br></div></div>
<br><br>