2
0
forked from Ivasoft/DSView

fix save/export issue when sample depth greater than 4G, or part of channels enabled

This commit is contained in:
DreamSourceLab
2017-07-21 15:11:09 +08:00
parent 7dc868140d
commit 0b9fe2236e
5 changed files with 22 additions and 17 deletions

View File

@@ -37,7 +37,7 @@ StoreProgress::StoreProgress(SigSession &session, QWidget *parent) :
_info.setText("...");
_progress.setValue(0);
_progress.setMaximum(0);
_progress.setMaximum(100);
QVBoxLayout* add_layout = new QVBoxLayout(this);
add_layout->addWidget(&_info, 0, Qt::AlignCenter);
@@ -114,9 +114,8 @@ void StoreProgress::on_progress_updated()
{
const std::pair<uint64_t, uint64_t> p = _store_session.progress();
assert(p.first <= p.second);
_progress.setValue(p.first);
_progress.setMaximum(p.second);
int percent = p.first * 1.0 / p.second * 100;
_progress.setValue(percent);
const QString err = _store_session.error();
if (!err.isEmpty()) {