Skip to content

Strange track bubble behavior in track editor #1113

Description

@JFritzle

Describe the bug

When selecting a track range in track editor, different issues may occur.
Description of issues see section Screenshots.

Depending on issue, debug may fire continously messages of kind
2026-06-12 11:02:09.533 [debug] cannot calculate pointerHeight/pointerBaseCenterX due to invalid parameters
at each mouse movement.

What have you done to circle down the problem?

Issues are caused due to computation formula of bubble box outline by function CDraw::bubble in file CDraw.cpp.

Hint:
To shrink height of bubble box, empty line at bottom of bubble box could probably get avoided by

  • removing final linefeed in line 557, function CGisItemTrk::getInfoRange() of file CGisItemTrk.cpp
  • removing final linefeed in line 588, function CGisItemTrk::getInfoRange() of file CGisItemTrk.cpp

A smaller bubble box could better fit into track elevation area, especially into a small area.

To Reproduce

See section Screenshots.

Expected behavior

I expect computation formula of bubble box outline to be revised in order to avoid any issues.

Screenshots

Track's elevation graph before selecting a track range without issues:
Image

Track's elevation graph after selecting a track range without issues,
mouse button released at arrow peak's position:
Image

Issue 1 - Parts of track information disappear.
Mouse button is released at arrow peak's position outside top of elevation graph rectangle:
Image

Issue 2 - Track bubble box drawn without arrow, debug now fires output at each mouse movement.
Mouse button is released at a lower position within elevation graph rectangle, here at track's elevation contour line:
Image

Issue 3 - Parts of track information disappear, bubble box drawn without arrow at right end of elavation graph, debug now fires output at each mouse movement.
During range selection, mouse pointer is moved outside bottom of elevation graph rectangle and released below position of label Distance [km]:
Image

Attachments

Tracebacks

Desktop

  • OS: any
  • QMapShack Version: any
  • Window Manager: -

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions