[Kstars-devel] Continuation of implementation for bug#178232

Abhijit Apte abhijit.apte at gmail.com
Sun Apr 11 16:28:59 CEST 2010


Hi Alexey,

Pl. find the updated patch, sorry it took a month :D
Also find my comments inlined below.

Rgds
-Abhi

== List of easily detectable bugs ==
>
> 1. Open popup menu with right click then click somewhere on the map to
> close
> it. In about half of cases rectangle appears.
>
> Fixed.


> 2. Once mouse cursor is moved away from skymap rectangle is stuck.
>
I didn't notice this after fixing issue mentioned in 1.


>
> == Comments ==
>
> 1, I think there is no need store SkyPoints for rectangle angles inside of
> SkyMap. It's better to calculate them from scree coordinates when mouse
> button
> is released and pass them into showObjectsInRect as parameters.
>
> But I think we'll still have to store first right click position (into
firstRClickPos)


> 2. instead of scary ladder of ifs in mouseMoveEvents you can use following
> code (if I get you intent correctly)
> > FindObjectsRect = QRect( firstRClickPos, e->pos() ).normalized();
> > update();
> Much shorter and easier to understand.
>
Yes, thanks for this comment, I tried this instead of the ladder and it
works.


>
> == Minor notes ==
> * QRect in drawBox should be passed as const reference.

Did this change

> * There is function QPainter::drawRect(const QRect&).
>
In the drawBox() implementation, modified the call p.drawRect( box.x(),
box.y()... ) with the above i.e. p.drawRect(box)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kstars-devel/attachments/20100411/669558f1/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch11apr.diff
Type: text/x-patch
Size: 7332 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kstars-devel/attachments/20100411/669558f1/attachment.diff 


More information about the Kstars-devel mailing list