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

Khudyakov Alexey alexey.skladnoy at gmail.com
Wed Mar 10 17:38:31 CET 2010


В сообщении от 08 марта 2010 22:02:55 вы написали:
> Incorporating review comments..
> Pl. find new patch attached.
> 
== 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.

2. Once mouse cursor is moved away from skymap rectangle is stuck. 

== 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.

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. 

== Minor notes ==
* QRect in drawBox should be passed as const reference. 
* There is function QPainter::drawRect(const QRect&). 


More information about the Kstars-devel mailing list