diff --git a/ksp_plugin_adapter/ksp_plugin_adapter.cs b/ksp_plugin_adapter/ksp_plugin_adapter.cs index a6c34fbce7..228d4c3b13 100644 --- a/ksp_plugin_adapter/ksp_plugin_adapter.cs +++ b/ksp_plugin_adapter/ksp_plugin_adapter.cs @@ -4,6 +4,8 @@ using System.Linq; using KSP.Localization; +using static principia.ksp_plugin_adapter.ReferenceFrameSelector.FrameType; + namespace principia { namespace ksp_plugin_adapter { @@ -2021,7 +2023,9 @@ private void RemoveStockTrajectoriesIfNeeded(CelestialBody celestial) { return; } celestial.orbitDriver.Renderer.drawMode = - main_window_.display_patched_conics + main_window_.display_patched_conics && + plotting_frame_selector_.frame_type == BODY_CENTRED_NON_ROTATING && + plotting_frame_selector_.Centre() == celestial.orbit.referenceBody ? OrbitRenderer.DrawMode.REDRAW_AND_RECALCULATE : OrbitRenderer.DrawMode.OFF; } @@ -2032,7 +2036,11 @@ private void RemoveStockTrajectoriesIfNeeded(Vessel vessel) { PatchRendering.RelativityMode.RELATIVE; } - if (main_window_.display_patched_conics || !is_manageable(vessel)) { + if ((main_window_.display_patched_conics && + plotting_frame_selector_.frame_type == BODY_CENTRED_NON_ROTATING && + plotting_frame_selector_.Centre() == + vessel.orbitDriver.orbit.referenceBody) || + !is_manageable(vessel)) { vessel.orbitDriver.Renderer.drawMode = vessel.PatchedConicsAttached ? OrbitRenderer.DrawMode.OFF