I think I get the idea of the ruler, however it does not seem to work properly:
When I enable the ruler mode the common red selection rectangle is no longer displayed but the tiles are still count. Therefore the selection is just invisible. Also the selection menu is still usable.
How is the ruler supposed to work: When I click left in ruler mode some times a line is added but mostly not. By wild clicking I managed to let the ruler draw some red lines and increase the ruler counter but that was more or less accidential. Also some of the line points were placed in regions far outside of the visible area.
May be you should add a tooltip on the ruler button explaining the basic usage of this tool. Otherwise nobody will be able to use it.
Furthermore I have some comments on the code:
The Ruler.java misses the MOBAC header
in Java variable names don't start with an undercores, especially if in the same method the variable name without underscore is already used. Please correct that.
In Java method names always start lower case
Please only include modifications in your patch file that are relevant.
For starting development please check out the ful project from SVN, otherwise the paths names in the diff file don't match. This also simplified the diff file creation and teh comparion what have been changed.
I encountered an java.lang.ArrayIndexOutOfBoundsException: -1 in mobac.gui.mapview.Ruler.Remove. Please always write safe code, e.g. check the segments list length before performing any actions on it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your fast feedback.
Just rollback the patch and dump it, i will make a new initial patch within the next hours with improvements.
Current behavior is the following:
. Selection disabled on purpose during measure.
. Right click erase the last inserted point.
. Press Backspace or Suppr once to clear points, twice to exit the ruler mode -> Selection comes back.
Did experienced a couple of off-screen segments too. I believe i have to disable double-click zoom in order to prevent points to be added at erroneous coordinates.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just rollback the patch and dump it
That is the advantage of using SVN (or any other version control system), you can simply revert all local changes. No need to rolback anything. You shoud really try it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok this one is better.
. Fixed the poor mouse behavior, off screen points.
. New buttons on top. Way more intuitive. https://i.ibb.co/6yGf30p/2.png
. Selection panels hidden while doing the measure
Have to upgrade the keyboard behavior. Stick to buttons from now.
Features i'de like to add:
. Export the segments as .gpx
. Auto select the tiles intersected by the path
Last edit: Reinert 2019-10-08
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The patch is invalid. Just look at it in an editor, the ruler lines are marked for deletion. Therefore I assume you have compared the wrong versions.
Again my advice: Checkout MOBAC from SVN and make your changes.
Afterwards use svn diff to create the patch file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I made some improvents to your patch (externalization of Strings, auto-formatting, code improvements) also the ruler button is now a checkbox like the wgsgrid checkbox.
Committed in SVN rev 2424
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think I get the idea of the ruler, however it does not seem to work properly:
May be you should add a tooltip on the ruler button explaining the basic usage of this tool. Otherwise nobody will be able to use it.
Furthermore I have some comments on the code:
java.lang.ArrayIndexOutOfBoundsException: -1
inmobac.gui.mapview.Ruler.Remove
. Please always write safe code, e.g. check the segments list length before performing any actions on it.Thanks for your fast feedback.
Just rollback the patch and dump it, i will make a new initial patch within the next hours with improvements.
Current behavior is the following:
. Selection disabled on purpose during measure.
. Right click erase the last inserted point.
. Press Backspace or Suppr once to clear points, twice to exit the ruler mode -> Selection comes back.
Did experienced a couple of off-screen segments too. I believe i have to disable double-click zoom in order to prevent points to be added at erroneous coordinates.
Ok this one is better.
. Fixed the poor mouse behavior, off screen points.
. New buttons on top. Way more intuitive.
https://i.ibb.co/6yGf30p/2.png
. Selection panels hidden while doing the measure
Have to upgrade the keyboard behavior. Stick to buttons from now.
Features i'de like to add:
. Export the segments as .gpx
. Auto select the tiles intersected by the path
Last edit: Reinert 2019-10-08
The patch is invalid. Just look at it in an editor, the ruler lines are marked for deletion. Therefore I assume you have compared the wrong versions.
Again my advice: Checkout MOBAC from SVN and make your changes.
Afterwards use
svn diff
to create the patch file.Last edit: Reinert 2019-10-09
Did it the right way on this one.
svn checkout of 2.1.2 2422 (2415 in title).
Last edit: Reinert 2019-10-09
I made some improvents to your patch (externalization of Strings, auto-formatting, code improvements) also the ruler button is now a checkbox like the wgsgrid checkbox.
Committed in SVN rev 2424
Excellent. I'm now working from the latest svn.
Please accept this minor patch. Thanks.