[education/kstars] kstars/ekos/focus: fix: Focus::focusOut ignoring caller-supplied step count
Jasem Mutlaq <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 51dc78af474f1f7f9999cf89cbe2ddd9768b0d0a by Jasem Mutlaq, on behalf of Thomas Nemer.
Committed on 16/07/2026 at 19:54.
Pushed by mutlaqja into branch 'master'.
fix: Focus::focusOut ignoring caller-supplied step count
The duplicate `ms = m_OpsFocusMechanics->focusTicks->value();` after the
`if (ms <= 0)` default was unconditionally overwriting any explicit value
passed by callers, so focusOut(100) always moved by the UI default.
focusIn does not have this stray line.
M +0 -1 kstars/ekos/focus/focus.cpp
https://invent.kde.org/education/kstars/-/commit/51dc78af474f1f7f9999cf89cbe2ddd9768b0d0a
diff --git a/kstars/ekos/focus/focus.cpp b/kstars/ekos/focus/focus.cpp
index de8fdf935a..88bcee7ba7 100644
--- a/kstars/ekos/focus/focus.cpp
+++ b/kstars/ekos/focus/focus.cpp
@@ -2087,7 +2087,6 @@ bool Focus::focusOut(int ms, int speedFactor)
startGotoB->setEnabled(false);
if (ms <= 0)
ms = m_OpsFocusMechanics->focusTicks->value();
- ms = m_OpsFocusMechanics->focusTicks->value();
// apply speed factor
ms *= speedFactor;