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;

View File

@@ -381,5 +381,9 @@
{
"id": "IDS_MSG_DATA_RANGE_ERROR",
"text": "数据范围设置错误!"
},
{
"id": "IDS_MSG_DATA_RANGE_HAVE_NO_DATA",
"text": "数据范围内无数据!"
}
]

View File

@@ -382,5 +382,9 @@
{
"id": "IDS_MSG_DATA_RANGE_ERROR",
"text": "Data range is error!"
},
{
"id": "IDS_MSG_DATA_RANGE_HAVE_NO_DATA",
"text": "No data in the data range!"
}
]