Improve clarity of math expressions in history for Standard Calculator (feature #138) (#1453)

* Implemented feature & added unit tests

* Fixed more unit/ui tests

* Refactored tests

* Update HistoryTests.cpp

* Update HistoryTests.cpp

* Update HistoryTests.cpp

* Update HistoryTests.cpp

* Update HistoryTests.cpp

* Update HistoryTests.cpp

* Update HistoryTests.cpp

* Update HistoryTests.cpp
This commit is contained in:
Wei (Waley) Zhang
2021-01-20 13:21:27 -08:00
committed by GitHub
parent 885fa23a89
commit 565e3e2714
5 changed files with 474 additions and 93 deletions

View File

@@ -265,6 +265,13 @@ void CCalcEngine::ProcessCommandWorker(OpCode wParam)
if (!m_bError)
{
DisplayNum();
if (!m_fPrecedence)
{
wstring groupedString = GroupDigitsPerRadix(m_numberString, m_radix);
m_HistoryCollector.CompleteEquation(groupedString);
m_HistoryCollector.AddOpndToHistory(m_numberString, m_currentVal);
}
}
if ((m_precedenceOpCount != 0) && (m_nPrecOp[m_precedenceOpCount - 1]))