mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-27 01:29:58 +01:00
[graph] Fix bug when initializing the selected function on graph
This commit is contained in:
committed by
EmilieNumworks
parent
34198945f2
commit
d36c0c8746
@@ -89,8 +89,8 @@ void GraphController::initCursorParameters() {
|
||||
y = firstFunction->evaluateAtAbscissa(x, myApp->localContext());
|
||||
} while (std::isnan(y) && functionIndex < functionStore()->numberOfActiveFunctions());
|
||||
m_cursor->moveTo(x, y);
|
||||
int functionSelected = functionStore()->activeFunctionStoreIndex(functionIndex-1);
|
||||
selectFunctionWithCursor(functionSelected < 0 ? 0 : functionSelected);
|
||||
functionIndex = std::isnan(y) ? 0 : functionIndex - 1;
|
||||
selectFunctionWithCursor(functionIndex);
|
||||
interactiveCurveViewRange()->panToMakePointVisible(x, y, k_cursorTopMarginRatio, k_cursorRightMarginRatio, k_cursorBottomMarginRatio, k_cursorLeftMarginRatio);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user