mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-20 18:34:53 +02:00
fix(editor): a touchpad no longer flips through the shapes nor throws the zoom far out
A touchpad under Wayland sends a scroll as many fractions of a notch. Shift+wheel took each of them for a step and went round the shapes of the laid track, the joins and the connections several times in one swipe; now the fractions are gathered into whole notches and a gesture moves such a choice one step. Ctrl+wheel steps the radius once a notch. The 3D zoom measured to the level 0 when nothing was under the cursor, which in a scenery on the terrain model lies far below or kilometres ahead, so a light swipe at the horizon flew the camera away. It measures to the ground under the camera now, backs away by no more than four heights of the camera over it, and takes at most two notches at a time. Self-test laystate tells the shape, the radius and the camera.
This commit is contained in:
@@ -169,6 +169,12 @@ editor_mode::selftest_result editor_mode::selftest_join(std::string const &comma
|
||||
lay_cancel();
|
||||
return selftest_result::handled;
|
||||
}
|
||||
if (command == "laystate")
|
||||
{
|
||||
WriteLog(format("SELFTEST laystate: layout %d, join variant %d, R %.0f m, join R %.0f m, camera %.1f %.1f %.1f, extent %.1f", static_cast<int>(m_track_layout), m_join_variant, m_lay.radius, m_join_radius, Camera.Pos.x,
|
||||
Camera.Pos.y, Camera.Pos.z, static_cast<double>(Global.EditorOrthoExtent)));
|
||||
return selftest_result::handled;
|
||||
}
|
||||
if (command == "layclicks")
|
||||
{
|
||||
int layout{0};
|
||||
|
||||
Reference in New Issue
Block a user