mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[calculation] Display exact and approximate results
Change-Id: Id5fe5b5db464c45f09bd1a1285def95e738a78c7
This commit is contained in:
@@ -47,7 +47,12 @@ bool HistoryController::handleEvent(Ion::Events::Event event) {
|
||||
if (subviewType == HistoryViewCell::SubviewType::Input) {
|
||||
editController->insertTextBody(calculation->inputText());
|
||||
} else {
|
||||
editController->insertTextBody(calculation->outputText());
|
||||
OutputExpressionsView::SubviewType outputSubviewType = selectedCell->outputView()->selectedSubviewType();
|
||||
if (outputSubviewType == OutputExpressionsView::SubviewType::ExactOutput) {
|
||||
editController->insertTextBody(calculation->exactOutputText());
|
||||
} else {
|
||||
editController->insertTextBody(calculation->approximateOutputText());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -97,7 +102,12 @@ bool HistoryController::handleEvent(Ion::Events::Event event) {
|
||||
if (subviewType == HistoryViewCell::SubviewType::Input) {
|
||||
Clipboard::sharedClipboard()->store(calculation->inputText());
|
||||
} else {
|
||||
Clipboard::sharedClipboard()->store(calculation->outputText());
|
||||
OutputExpressionsView::SubviewType outputSubviewType = selectedCell->outputView()->selectedSubviewType();
|
||||
if (outputSubviewType == OutputExpressionsView::SubviewType::ExactOutput) {
|
||||
Clipboard::sharedClipboard()->store(calculation->exactOutputText());
|
||||
} else {
|
||||
Clipboard::sharedClipboard()->store(calculation->approximateOutputText());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user