Update IndicatorImp.cpp

修正void IndicatorImp::setContext(const Stock &stock, const KQuery &query)中是否修改Context的判断逻辑,原逻辑为stock或quey有一项没有改动就不修改Context,在遍历时,这个逻辑会导致Context永远为第一个设置的Context
This commit is contained in:
kbugstar 2023-09-26 15:35:35 +08:00 committed by GitHub
parent 4036c182ef
commit 4b1c4ed0f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,7 +113,7 @@ void IndicatorImp::initContext() {
void IndicatorImp::setContext(const Stock &stock, const KQuery &query) {
KData kdata = getContext();
if (kdata.getStock() == stock || kdata.getQuery() == query) {
if (kdata.getStock() == stock && kdata.getQuery() == query) {
if (m_need_calculate) {
calculate();
}