Modify

Opened 13 years ago

Closed 13 years ago

Last modified 8 years ago

#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)

coloring.patch (15.5 KB ) - added by akks 13 years ago.
customize gpx track coloring
coloring2.patch (49.3 KB ) - added by akks 13 years ago.
coloringpatch2patch.patch (2.3 KB ) - added by akks 13 years ago.
coloringpatch2patch2.patch (10.8 KB ) - added by akks 13 years ago.
coloringPrefsAndLocal.patch (7.0 KB ) - added by akks 13 years ago.

Download all attachments as: .zip

Change History (25)

by akks, 13 years ago

Attachment: coloring.patch added

customize gpx track coloring

comment:1 by stoecker, 13 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.

comment:2 by akks, 13 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?

Version 2, edited 13 years ago by akks (previous) (next) (diff)

in reply to:  2 comment:3 by stoecker, 13 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 akks, 13 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).

Last edited 13 years ago by akks (previous) (diff)

comment:5 by akks, 13 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 akks, 13 years ago

Type: defectenhancement

by akks, 13 years ago

Attachment: coloring2.patch added

comment:7 by akks, 13 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 stoecker, 13 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:9 by stoecker, 13 years ago

Resolution: fixed
Status: newclosed

In [4270/josm]:

fix #6629 - patch by akks fixed by me - improve settings handling for individual GPX tracks

comment:10 by stoecker, 13 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 akks, 13 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 :)

Last edited 13 years ago by akks (previous) (diff)

by akks, 13 years ago

Attachment: coloringpatch2patch.patch added

comment:12 by akks, 13 years ago

Resolution: fixed
Status: closedreopened
Summary: [PATCH need review] GPX tracks color customization menu + color by timestamp[PATCH 2 PATCH] GPX tracks color customization menu + color by timestamp

comment:13 by stoecker, 13 years ago

In [4273/josm]:

see #6629 - fix layer setting save for multiple layers

comment:14 by stoecker, 13 years ago

Summary: [PATCH 2 PATCH] GPX tracks color customization menu + color by timestampGPX 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 akks, 13 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 akks, 13 years ago

Attachment: coloringpatch2patch2.patch added

comment:16 by stoecker, 13 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.

in reply to:  16 comment:17 by akks, 13 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.

Last edited 13 years ago by akks (previous) (diff)

by akks, 13 years ago

Attachment: coloringPrefsAndLocal.patch added

comment:18 by akks, 13 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.

comment:19 by stoecker, 13 years ago

Resolution: fixed
Status: reopenedclosed

In [4276/josm]:

fix #6629 - patch by akks - fix gpx layer settings changes

comment:20 by stoecker, 8 years ago

Ticket #2346 has been marked as a duplicate of this ticket.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.