Skip to content

Conversation

@FantasyTeddy
Copy link
Contributor

No description provided.

FantasyTeddy and others added 20 commits October 26, 2025 16:05
…AlwaysCm

#1019 Havester front hitch unit label always cm
…ncorrect-image-in-config

Correct config image for hitch of articulated
…too-many

Bugfix/1026 one guideline too many and 1025 half of extra guide lines do not show green foreground color.
Rephrase 'Delete For Sure' -> 'Are you sure you want to delete?'
Improves track copying and conversion process.

Ensures copied tracks are correctly converted between
coordinate systems by saving current track changes,
reloading them to include recent edits, and clearing track
references before loading new ones.

Normalizes track headings and resets worked tracks for new
fields, also makes copied tracks visible by default. Recalculates
headings for curve points using GeoDir to ensure accuracy
during conversion.

Refactor track copying: separate business logic from UI

- Create stateless TrackCopier class with conversion logic
- Move all coordinate conversion code to TrackCopier
- Replace custom FieldInfo with FieldDescription from Core
- FormCopyTracks now only handles UI interactions
- Improves testability and maintainability

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Rename "Copy Tracks" to "Import Tracks" (more accurate terminology)
- Remove unused field variables (availableTracks, availableFields as class members)
- Use DirectoryInfo directly instead of FieldDescription wrapper
- Simplify field comparison using field name only (not full path)
- Use early return pattern for validation checks
- Make ConvertTracks() private (only CopyTracksToField() is public API)
- Keep form open after import to allow multiple imports
- Count fields/tracks using Items.Count/Controls.Count directly
After importing tracks, the track index (trk.idx) was set to -1. When the user
clicked the cycle backwards button, the index would decrement to -2, causing an
ArgumentOutOfRangeException when trying to access trk.gArr[-2].

The fix sets the index to the first visible track after import, ensuring it's
always in a valid range when tracks are present.
@FantasyTeddy FantasyTeddy merged commit d69949c into develop Nov 19, 2025
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.

4 participants