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:
@@ -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;
|
||||
|
||||
@@ -381,5 +381,9 @@
|
||||
{
|
||||
"id": "IDS_MSG_DATA_RANGE_ERROR",
|
||||
"text": "数据范围设置错误!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_DATA_RANGE_HAVE_NO_DATA",
|
||||
"text": "数据范围内无数据!"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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!"
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user