diff --git a/openhantek/ChangeLog b/openhantek/ChangeLog index 0e1615c..9df95fa 100644 --- a/openhantek/ChangeLog +++ b/openhantek/ChangeLog @@ -199,3 +199,7 @@ 2012-11-27 Oliver Haag * Bugfix: Hantek::Control::setChannelUsed used setTrigger instead of setChannels + +2012-12-04 Oliver Haag +* Workaround for stacked QGLWidget on Mac OS X +* Bugfix: Check for connected scope on setSamplerate/setRecordTime diff --git a/openhantek/src/dsowidget.cpp b/openhantek/src/dsowidget.cpp index 7552bb9..35d54d7 100644 --- a/openhantek/src/dsowidget.cpp +++ b/openhantek/src/dsowidget.cpp @@ -64,6 +64,12 @@ DsoWidget::DsoWidget(DsoSettings *settings, DataAnalyzer *dataAnalyzer, QWidget this->zoomScope->setGenerator(this->generator); this->zoomScope->setZoomMode(true); +#ifdef OS_DARWIN + // Workaround for https://bugreports.qt-project.org/browse/QTBUG-8580 + this->mainScope->hide(); + this->mainScope->show(); +#endif + // The offset sliders for all possible channels this->offsetSlider = new LevelSlider(Qt::RightArrow); for(int channel = 0; channel < this->settings->scope.voltage.count(); ++channel) { diff --git a/openhantek/src/hantek/control.cpp b/openhantek/src/hantek/control.cpp index 2c17c7c..32576c6 100644 --- a/openhantek/src/hantek/control.cpp +++ b/openhantek/src/hantek/control.cpp @@ -1040,6 +1040,9 @@ namespace Hantek { /// \param samplerate The samplerate that should be met (S/s), 0.0 to restore current samplerate. /// \return The samplerate that has been set, 0.0 on error. double Control::setSamplerate(double samplerate) { + if(!this->device->isConnected()) + return 0.0; + if(samplerate == 0.0) { samplerate = this->settings.samplerate.target.samplerate; } @@ -1067,6 +1070,9 @@ namespace Hantek { /// \param duration The record time duration that should be met (s), 0.0 to restore current record time. /// \return The record time duration that has been set, 0.0 on error. double Control::setRecordTime(double duration) { + if(!this->device->isConnected()) + return 0.0; + if(duration == 0.0) { duration = this->settings.samplerate.target.duration; }