diff --git a/DSView/main.cpp b/DSView/main.cpp index 9320ec81..0d3a763f 100644 --- a/DSView/main.cpp +++ b/DSView/main.cpp @@ -40,8 +40,6 @@ #include "config.h" -char decoders_path[256]; - void usage() { fprintf(stdout, @@ -122,11 +120,6 @@ int main(int argc, char *argv[]) do { #ifdef ENABLE_DECODE - QDir dir(QCoreApplication::applicationDirPath()); - assert(dir.cd("decoders")); - std::string str = dir.absolutePath().toStdString() + "/"; - strcpy(decoders_path, str.c_str()); - // Initialise libsigrokdecode if (srd_init(NULL) != SRD_OK) { qDebug() << "ERROR: libsigrokdecode init failed."; diff --git a/DSView/pv/view/viewport.cpp b/DSView/pv/view/viewport.cpp index b6de471e..87737fc2 100644 --- a/DSView/pv/view/viewport.cpp +++ b/DSView/pv/view/viewport.cpp @@ -132,8 +132,9 @@ void Viewport::paintEvent(QPaintEvent *event) break; case SigSession::Running: - //p.setRenderHint(QPainter::Antialiasing); + p.setRenderHint(QPainter::Antialiasing); paintProgress(p); + p.setRenderHint(QPainter::Antialiasing, false); break; } } else { @@ -352,6 +353,7 @@ void Viewport::mousePressEvent(QMouseEvent *event) _mouse_down_point = event->pos(); _mouse_down_offset = _view.offset(); + _measure_shown = false; if (event->buttons() & Qt::LeftButton) { if (_view.cursors_shown()) { @@ -435,7 +437,7 @@ void Viewport::mouseReleaseEvent(QMouseEvent *event) if (_zoom_rect_visible) { _zoom_rect_visible = false; const double newOffset = _view.offset() + (min(event->pos().x(), _mouse_down_point.x()) + 0.5) * _view.scale(); - const double newScale = max(min(_view.scale() * (event->pos().x() - _mouse_down_point.x()) / _view.get_view_width(), + const double newScale = max(min(_view.scale() * abs(event->pos().x() - _mouse_down_point.x()) / _view.get_view_width(), _view.get_maxscale()), _view.get_minscale()); if (newScale != _view.scale()) _view.set_scale_offset(newScale, newOffset); @@ -475,7 +477,7 @@ void Viewport::wheelEvent(QWheelEvent *event) if (event->orientation() == Qt::Vertical) { // Vertical scrolling is interpreted as zooming in/out - const double offset = (_view.session().get_capture_state() == SigSession::Running) ? 0 : event->x(); + const double offset = event->x(); _view.zoom(event->delta() / 80, offset); } else if (event->orientation() == Qt::Horizontal) { // Horizontal scrolling is interpreted as moving left/right diff --git a/DSView/res/DSCope.bin b/DSView/res/DSCope.bin index 50ea4a8f..94baf28d 100644 Binary files a/DSView/res/DSCope.bin and b/DSView/res/DSCope.bin differ diff --git a/DSView/res/DSLogic33.bin b/DSView/res/DSLogic33.bin index 0d3aa278..9a3304f6 100644 Binary files a/DSView/res/DSLogic33.bin and b/DSView/res/DSLogic33.bin differ diff --git a/DSView/res/DSLogic50.bin b/DSView/res/DSLogic50.bin index 4f1915f9..627020fb 100644 Binary files a/DSView/res/DSLogic50.bin and b/DSView/res/DSLogic50.bin differ diff --git a/DSView/res/DSLogicPro.bin b/DSView/res/DSLogicPro.bin index 29eacaa3..9b6b0982 100644 Binary files a/DSView/res/DSLogicPro.bin and b/DSView/res/DSLogicPro.bin differ