17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-18 19:39:20 +02:00

fix(editor): K splits the selected track where the cursor points on screen (as the hover highlight finds it), not at the delayed depth pick which hit the ground beside the rail

This commit is contained in:
maj00r
2026-10-12 00:44:54 +02:00
parent 704511fe5e
commit 866f626668
3 changed files with 9 additions and 5 deletions

View File

@@ -5477,7 +5477,11 @@ void editor_mode::on_key(int const Key, int const Scancode, int const Action, in
break;
}
if (is_press(Action) && ui()->mode() == nodebank_panel::TRACK && selected_track() != nullptr)
split_track_at(*selected_track(), Global.pCamera.Pos + GfxRenderer->Mouse_Position());
{
auto const under{track_under_cursor(selected_track())};
if (under.track != nullptr)
split_track_at(*under.track, under.point);
}
break;
case GLFW_KEY_F: