#6629 closed enhancement (fixed)
GPX tracks color customization menu + color by timestamp
Reported by: | akks | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | Cc: |
Description
After discussion on Russian forum I tried to make some improvements in GPXLayer.
Currently, I have added color mode menu for track layer (mostly based on CustomizeLineDrawing code) and new coloring mode - by timestamp (if no timestamp, default color is used).
I also started separate plugin InfoMode for displaying trackpoint info, hiding individual tracks* and filtering* (* - not yet implemented) #5662, #4133 .
Please have a look at the patch. Do we need to rework settings code (like #5105 says) ?
Should something be added - maybe filtering like 'hide trackss older than <date>'?
Attachments (5)
Change History (25)
by , 14 years ago
Attachment: | coloring.patch added |
---|
comment:1 by , 14 years ago
Summary: | [PATCH] GPX tracks color customization menu + color by timestamp → [PATCH need rework] GPX tracks color customization menu + color by timestamp |
---|
I don't like the implementation of this. The Preferences for individual track settings and generic track settings should be unified and all settings should be changeable. I already introduced the settings usage accordingly, so currently only the user interface is missing.
Also I see no sense in "draw.rawgps.colors.local". The special local file handling for the segment length is due to the server clipping. For color mode not such special handling is required.
follow-up: 3 comment:2 by , 14 years ago
I just made additional item in the same code/gui structure.
Removing local is simple. But what to do with settings? Do we need GpxDisplaySettings class? Will you refactor it yourself?
Separate menu items looks logical... How to make the same user interface for global and local settings then? Hide part of the panels?
comment:3 by , 14 years ago
Replying to akks:
I just made additional item in the same code/gui structure.
But existing structure is not really good ... It is from the time, where GPX drawing had not so many options.
Removing local is simple. But what to do with settings? Do we need GpxDisplaySettings class?
Probably. I thought of maybe simply adding a parameter to the preferences class which the changes layout to a "this layer" method. But I'm not sure if this will work as I thought. Probably a own class is cleaner design.
Will you refactor it yourself?
I wanted to do so, but currently lack the time.
Separate menu items looks logical... How to make the same user interface for global and local settings then? Hide part of the panels?
Something like this. Yes.
comment:4 by , 14 years ago
OK, I will try to implement it, but some help will be needed. I will post the code and questions here, when it is ready.
After looking at the code more thoroghly, I agree that reading preferences is acceptable now (and GpxLayer need huge refactoring to introduce GpxDisplaySettings class). So I will only change GUI of GPX preference-editing part (make it customizable by adding optional layer name and mode, separate reading pereferences function).
comment:5 by , 14 years ago
Here is the result of preferences unification. I decided to leave only one menu item for track customization - it seems to be quite usable.
I do not know how to add global settings option for "Draw larger dots" and "HDOP" - there will be too many checkboxes.
Please tell me, what to do with this patch. (I am including Filter Tracks menu item meanwhile :) )
comment:6 by , 14 years ago
Type: | defect → enhancement |
---|
by , 14 years ago
Attachment: | coloring2.patch added |
---|
comment:7 by , 14 years ago
Summary: | [PATCH need rework] GPX tracks color customization menu + color by timestamp → [PATCH need review] GPX tracks color customization menu + color by timestamp |
---|
comment:8 by , 14 years ago
Looks good on first check, I still need to apply and test. I have holidays soon and thus are a bit overloaded to get everything done at work until it begins :-)
comment:10 by , 14 years ago
I'm not totally happy, as the local/server changes for individual tracks are not really required - josm should know whether a track is server or local based, thus this should be handled automatically. Better better than before it is in any case.
comment:11 by , 14 years ago
Thank you for applying and editing!
There s one problem - it does not save custom track preferences at all now due to specSp variable problem.
Here is a patch for the patch. It also contains line 83 to make you happier before holidays :)
by , 14 years ago
Attachment: | coloringpatch2patch.patch added |
---|
comment:12 by , 14 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Summary: | [PATCH need review] GPX tracks color customization menu + color by timestamp → [PATCH 2 PATCH] GPX tracks color customization menu + color by timestamp |
comment:14 by , 14 years ago
Summary: | [PATCH 2 PATCH] GPX tracks color customization menu + color by timestamp → GPX tracks color customization menu + color by timestamp |
---|
No this patch does not work.
There is a reason, why I did not use "spec", but specSP in getting the value. When ",spec," is used, the default-value handling is wrong.
Also simply disabling local is also wrong. A track may be global or local, so the correct one must be deactivated.
comment:15 by , 14 years ago
Ok, I tried to deactivate correct button (rather sophisticated bahaviour based on level) and use specSP only (no ",spec" at all - why do not you improve defult value handling?)
I hope this patch will fit (it seems to work for me, I checked local tracks,global configs, multiple layers).
by , 14 years ago
Attachment: | coloringpatch2patch2.patch added |
---|
follow-up: 17 comment:16 by , 14 years ago
You overlooked the changes done in 4273. Your patch wont apply.
The issue with the default only applies to the case where "5" is passed as default, as this can not be the default value for the original non-layer setting. For the other cases the default values match and everything is fine.
comment:17 by , 14 years ago
Err, 4273 tries to store global preferences to "draw.rawgps.colors.layer null" and so on! I am preparing new patch..
Replying to stoecker:
You overlooked the changes done in 4273. Your patch wont apply.
Yes. Strange... I am removing already implemented part.
by , 14 years ago
Attachment: | coloringPrefsAndLocal.patch added |
---|
comment:18 by , 14 years ago
Here is the patch. It fixes global preferences bug and tries to deal with local/global settings: if we edit local file layer settings, we do not see "All" radiobutton, if multiple layer settings are edited, all needed radiobuttons are showed, but preferences are saved only as local/nonlocal for each layer.
customize gpx track coloring