summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Mueller <marcus@hostalia.de>2014-11-25 09:31:18 -0500
committerTom Rondeau <tom@trondeau.com>2014-12-03 19:01:35 -0500
commit92ac02f7fd7289d11fa6523e0491c6a6d8c3cb56 (patch)
treebe92384f762dd67f04c872942246474aaada2d3a
parent9cfa4ba55ff4431ede3b1abc89a6ef2763b3a5b5 (diff)
qtgui: compare current time domain x-axis unit with new unit to ensure time scale update.
-rw-r--r--gr-qtgui/lib/TimeDomainDisplayPlot.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/gr-qtgui/lib/TimeDomainDisplayPlot.cc b/gr-qtgui/lib/TimeDomainDisplayPlot.cc
index 3fc592481f..7b81c86d2e 100644
--- a/gr-qtgui/lib/TimeDomainDisplayPlot.cc
+++ b/gr-qtgui/lib/TimeDomainDisplayPlot.cc
@@ -85,6 +85,11 @@ public:
d_unitType = type;
}
+ std::string unitType()
+ {
+ return d_unitType;
+ }
+
void setYUnitType(const std::string &type)
{
d_yUnitType = type;
@@ -474,7 +479,8 @@ TimeDomainDisplayPlot::setSampleRate(double sr, double units,
const std::string &strunits)
{
double newsr = sr/units;
- if(newsr != d_sample_rate) {
+ if((newsr != d_sample_rate) ||
+ (((TimeDomainDisplayZoomer*)d_zoomer)->unitType() != strunits)) {
d_sample_rate = sr/units;
_resetXAxisPoints();