mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[graph] Values tab: select the right cell of the values table when
displaying/undisplaying the derivative column
This commit is contained in:
committed by
LeaNumworks
parent
2a34f955ca
commit
e40e626eec
@@ -19,7 +19,9 @@ bool StorageFunctionParameterController::handleEvent(Ion::Events::Event event) {
|
||||
switch (selectedRow()) {
|
||||
case 0:
|
||||
{
|
||||
function()->setDisplayDerivative(!function()->displayDerivative());
|
||||
bool isDisplayingDerivative = function()->displayDerivative();
|
||||
function()->setDisplayDerivative(!isDisplayingDerivative);
|
||||
m_valuesController->selectCellAtLocation(isDisplayingDerivative ? m_selectedFunctionColumn : m_selectedFunctionColumn + 1, m_valuesController->selectedRow());
|
||||
m_selectableTableView.reloadData();
|
||||
return true;
|
||||
}
|
||||
@@ -57,9 +59,7 @@ int StorageFunctionParameterController::reusableCellCount() {
|
||||
|
||||
void StorageFunctionParameterController::viewWillAppear() {
|
||||
StorageValuesFunctionParameterController::viewWillAppear();
|
||||
if (function()->displayDerivative()) {
|
||||
m_valuesController->selectCellAtLocation(m_valuesController->selectedColumn()+1, m_valuesController->selectedRow());
|
||||
}
|
||||
m_selectedFunctionColumn = m_valuesController->selectedColumn();
|
||||
}
|
||||
|
||||
void StorageFunctionParameterController::willDisplayCellForIndex(HighlightCell * cell, int index) {
|
||||
|
||||
@@ -27,6 +27,8 @@ private:
|
||||
#endif
|
||||
MessageTableCellWithSwitch m_displayDerivativeColumn;
|
||||
StorageValuesController * m_valuesController;
|
||||
// Index of the column corresponding to the function in the values controller
|
||||
int m_selectedFunctionColumn;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user