2
0
forked from Ivasoft/DSView

fix: Failed to calculate the math Function on DSO mode

This commit is contained in:
dreamsourcelabTAI
2023-03-06 19:49:03 +08:00
parent 8671e6d0d9
commit 9b4a564ae9
3 changed files with 14 additions and 2 deletions

View File

@@ -216,7 +216,10 @@ void MathOptions::accept()
dsoSig2 = dsoSig;
}
}
_session->math_rebuild(enable, dsoSig1, dsoSig2, type);
if (dsoSig1 != NULL && dsoSig2 != NULL){
_session->math_rebuild(enable, dsoSig1, dsoSig2, type);
}
}
void MathOptions::reject()

View File

@@ -1438,6 +1438,9 @@ namespace pv
{
ds_lock_guard lock(_data_mutex);
assert(dsoSig1);
assert(dsoSig2);
auto math_stack = new data::MathStack(this, dsoSig1, dsoSig2, type);
DESTROY_OBJECT(_math_trace);
_math_trace = new view::MathTrace(enable, math_stack, dsoSig1, dsoSig2);

View File

@@ -133,6 +133,10 @@ int Trace::get_type()
int Trace::get_index()
{
if(_index_list.size() == 0){
assert(false);
}
return _index_list.front();
}
@@ -143,7 +147,9 @@ std::list<int> Trace::get_index_list()
void Trace::set_index_list(const std::list<int> &index_list)
{
assert(index_list.size() != 0);
if (index_list.size() == 0){
assert(false);
}
_index_list = index_list;
}