Commit 705819fa authored by DreamSourceLab's avatar DreamSourceLab

Fix minor issues of sesion load and/display/drag-and-drop

parent 63772095
......@@ -116,7 +116,7 @@ TriggerDock::TriggerDock(QWidget *parent, SigSession &session) :
_inv1_comboBox->addItem(tr("!="));
_inv1_comboBox_list.push_back(_inv1_comboBox);
QLabel *value_exp_label = new QLabel("1 1 1 1 1 1\n5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0", _widget);
QLabel *value_exp_label = new QLabel("1 1 1 1 1 1\n5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 ", _widget);
QLabel *inv_exp_label = new QLabel("Inv", _widget);
QLabel *count_exp_label = new QLabel("Counter", _widget);
value_exp_label->setFont(font);
......@@ -256,7 +256,7 @@ TriggerDock::TriggerDock(QWidget *parent, SigSession &session) :
_widget->setLayout(layout);
this->setWidget(_widget);
_widget->setGeometry(0, 0, sizeHint().width(), 1000);
//_widget->setGeometry(0, 0, sizeHint().width(), 1000);
_widget->setObjectName("triggerWidget");
}
......
......@@ -683,10 +683,8 @@ bool MainWindow::load_session(QString name)
s->set_trig(obj["strigger"].toDouble());
boost::shared_ptr<view::DsoSignal> dsoSig;
if (dsoSig = dynamic_pointer_cast<view::DsoSignal>(s)) {
dsoSig->update_hDial();
//dsoSig->update_vDial();
dsoSig->load_settings();
dsoSig->set_zeroRate(obj["zeroPos"].toDouble());
dsoSig->set_enable(obj["enabled"].toBool());
dsoSig->set_trigRate(obj["trigValue"].toDouble());
}
break;
......
This diff is collapsed.
......@@ -121,9 +121,7 @@ public:
void set_factor(uint64_t factor);
uint64_t get_factor();
bool update_vDial();
bool update_hDial();
bool update_acCoupling();
bool load_settings();
/**
*
......
......@@ -538,11 +538,14 @@ void Viewport::mouseReleaseEvent(QMouseEvent *event)
if (_view.session().get_device()->dev_inst()->mode == LOGIC &&
_measure_type != LOGIC_EDGE) {
const double strength = _drag_strength*DragTimerInterval*1.0/_time.elapsed();
if (abs(_drag_strength) < MinorDragOffsetUp && abs(strength) > MinorDragRateUp) {
if (_time.elapsed() < 200 &&
abs(_drag_strength) < MinorDragOffsetUp &&
abs(strength) > MinorDragRateUp) {
_drag_strength = _drag_strength;
_drag_timer.start(DragTimerInterval);
_measure_type = LOGIC_MOVE;
} else if (abs(strength) > DragTimerInterval) {
} else if (_time.elapsed() < 200 &&
abs(strength) > DragTimerInterval) {
_drag_strength = strength * 5;
_drag_timer.start(DragTimerInterval);
_measure_type = LOGIC_MOVE;
......@@ -623,7 +626,7 @@ void Viewport::leaveEvent(QEvent *)
_measure_shown = _dso_xm || _dso_ym;
_mouse_point = QPoint(-1, -1);
//_view.show_cursors(false);
if (_measure_type == LOGIC_EDGE) {
if (_measure_type == LOGIC_EDGE || _measure_type == LOGIC_MOVE) {
_measure_type = NO_MEASURE;
_measure_shown = false;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment