Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trackpoint labels #3

Merged
merged 2 commits into from
Dec 4, 2015
Merged

trackpoint labels #3

merged 2 commits into from
Dec 4, 2015

Conversation

Shura0
Copy link
Contributor

@Shura0 Shura0 commented Jul 7, 2015

Hi!
I have added labels for trackpoints names, please look, maybe it will be useful not only for me.

@rnorris
Copy link
Collaborator

rnorris commented Jul 11, 2015

Thank you for taking an interest in Viking.

As you have found, displaying trackpoint names is not particularly difficult.

However the way the names get drawn on the screen mean that:

  1. The screen could get covered in names such that you can't understand what is being displayed
  2. If many names are shown it tends to slow the redraw process a lot.
  3. Currently your code loops through every track again - which any will slow down the redraw if displaying many tracks with many trackpoints.

Thus I think we need at least a simple TrackWaypoint Layer -> Tracks tab option to control whether Trackpoint names should be displayed or not.

@Shura0
Copy link
Contributor Author

Shura0 commented Jul 11, 2015

Thank you for answer.

  1. Currently your code loops through every track again - which any will slow down the redraw if displaying many tracks with many trackpoints.

Yes, but it's impossible to draw labels inside main cycle together with points and lines. Next objects will be drawn above the labels.

Thus I think we need at least a simple TrackWaypoint Layer -> Tracks tab option to control whether Trackpoint names should be displayed or not.

Now it can be controlled by 'Draw labels' checkbox on 'Tracks' tab.
I have never worked with GTK and afraid I cannot add new checkbox

@rnorris
Copy link
Collaborator

rnorris commented Jul 17, 2015

Now it can be controlled by 'Draw labels' checkbox on 'Tracks' tab.

I think that's fine.

But I don't see the updated code anywhere?

PS about GTK: Viking has it's own abstraction used for Layer and Global properties to potentially make it easier to add GUI items. Then one also needs to store the values in memory for the current session + methods to save to disk for longer term saving/recall. Of course you'd need to examine the code more closely to understand how Viking achieves this via GTK / glib / standard C.

@Shura0
Copy link
Contributor Author

Shura0 commented Jul 17, 2015

But I don't see the updated code anywhere?

It works with your old code.

@rnorris
Copy link
Collaborator

rnorris commented Jul 17, 2015

Ahh, yes it does, sorry! I was just looking at the patch difference, so I didn't notice it was performed within the existing draw labels section.

I will merge this request, but I'm debating whether to include include in the imminent 1.6.1 release.
If one thinks it's new functionality, then it should go into 1.7 onwards (but that release won't happen for a while).
Alternatively if one considers not showing this information a 'defect' then adding it to 1.6.1 is OK.
ATM I'm leaning more towards adding it for 1.6.1

rnorris added a commit that referenced this pull request Dec 4, 2015
@rnorris rnorris merged commit 42ced7f into viking-gps:master Dec 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants