2
0
forked from Ivasoft/DSView

When saving data, if there is no data within the specified range, a warning will be prompted

This commit is contained in:
dreamsourcelabTAI
2024-04-02 11:21:22 +08:00
parent a02d722ceb
commit 37e2f03cc5
3 changed files with 19 additions and 1 deletions

View File

@@ -192,7 +192,17 @@ void StoreProgress::accept()
MsgBox::Show(mStr);
return;
}
else if (start_index > end_index){
int total_count = _view->session().get_ring_sample_count();
if (start_index > total_count && end_index > total_count)
{
QString mStr = L_S(STR_PAGE_MSG, S_ID(IDS_MSG_DATA_RANGE_HAVE_NO_DATA), "No data in the data range");
MsgBox::Show(mStr);
return;
}
if (start_index > end_index){
uint64_t tmp = start_index;
start_index = end_index;
end_index = tmp;