Skip to content

GPS filters: add support for txt files, auto match gps, update UIs - #1944

Merged
ddennedy merged 6 commits into
mltframework:masterfrom
dany123:gps/auto_gps_file
Oct 26, 2026
Merged

ddennedy merged 6 commits into
mltframework:masterfrom
dany123:gps/auto_gps_file

Conversation

@dany123

@dany123 dany123 commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor
  • open file dialog now accepts .txt and *.*
  • on filter.new: UI now automatically checks if the backend has found a companion GPS file and updates it automatically (only if found in the first second)
  • changed the default rectangle to be nicer and consistent: both GPS filters are now aligned at the 95% line, text is bottom left, graph is bottom right
  • updated the UI for GPS graphic size&position with 3 buttons:
    • fill screen (99% actually, as the line thickness can sometimes exceed the rect if exactly on edge)
    • default (bottom right 20% of profile height/width)
    • fix aspect ratio -> this one was present before but not very obvious so it gets a separate button as was requested on the forum, it resizes the rectangle to match the actual shape of the GPS track, it will always keep the same top-left corner and shrink to fit

before vs after:
image

image

mlt change: mltframework/mlt#1347

@dany123

dany123 commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Question: do I need to add a new filter version and restrict the file open dialogue file types to remove .txt from the list?
I feel like it shouldn't be necessary as it doesn't actually beak anything, just like choosing an invalid .gpx file would simply not load. Not to mention the addition of *.* basically negates any future version checks for unsupported filetypes.

@ddennedy

Copy link
Copy Markdown
Member

I do not think the file dialog's types list needs a version check.

@ddennedy ddennedy added this to the v26.next milestone Oct 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Multiple unresolved moderate issues affect file selection, default geometry, and automatic aspect-ratio handling.

6 open issues
What changed in this PR

This pull request updates the GPS text and graphic filter UIs with .txt/all-files support, automatic companion GPS detection, improved positioning defaults, and new graphic sizing controls.

Changes:

  • Adds .txt and all-files options to both GPS file dialogs.
  • Adds short-lived polling for automatically detected companion GPS files.
  • Updates GPS placement defaults and adds fullscreen, default-position, and aspect-ratio controls for GPS graphics.
File Description Review findings
src/​qml/​filters/​gpstext/​ui.qml Adds text-file support, automatic companion-file handling, and updated text positioning. Moderate, 3 votes: *.* entries at lines 176 and 206 are not wrapped in the required Qt name-filter parentheses. Nit, 2 votes: the newly added non-reassigned local at line 198 should use const instead of var.
src/​qml/​filters/​gpsgraphic/​ui.qml Adds graphic file support, companion-file detection, updated defaults, and rectangle sizing controls. Moderate, 3 votes: *.* entries at lines 404 and 433 need Qt name-filter parentheses. Moderate, 2 votes: default_rect is not persisted because the helper ignores its rect argument. Moderate, 1 vote: aspect-ratio correction must reject non-positive or reversed crop spans. Moderate, 1 vote: automatic companion-file handling does not apply the same aspect-ratio update as manual selection. Nit, 2 votes: rename underscore-style identifiers to camelCase. Nit, 2 votes: use const for non-reassigned locals, including line 1703. Nit, 1 vote: adjust the fullscreen preset to produce the specified 99% rectangle.

Review effort: Lite

Comment thread src/qml/filters/gpsgraphic/ui.qml
Comment thread src/qml/filters/gpsgraphic/ui.qml Outdated
Comment thread src/qml/filters/gpstext/ui.qml Outdated
Comment thread src/qml/filters/gpsgraphic/ui.qml Outdated
Comment thread src/qml/filters/gpsgraphic/ui.qml
Comment thread src/qml/filters/gpstext/ui.qml Outdated
@ddennedy
ddennedy merged commit 53f89cf into mltframework:master Oct 26, 2026
2 checks passed
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.

3 participants