projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eae3bbb
)
AnalogSignal: Only report an extent change when there is one
author
Soeren Apel
<soeren@apelpie.net>
Fri, 26 May 2017 09:34:31 +0000
(11:34 +0200)
committer
Soeren Apel
<soeren@apelpie.net>
Fri, 26 May 2017 17:36:04 +0000
(19:36 +0200)
pv/view/analogsignal.cpp
patch
|
blob
|
history
diff --git
a/pv/view/analogsignal.cpp
b/pv/view/analogsignal.cpp
index 63e759f97ed7411922b70e2af4946dd2df643ad9..106735567c78e11363a2c0d9cda6d750c0b1f937 100644
(file)
--- a/
pv/view/analogsignal.cpp
+++ b/
pv/view/analogsignal.cpp
@@
-608,13
+608,17
@@
void AnalogSignal::perform_autoranging(bool keep_divs, bool force_update)
// If there is still no positive div when we need it, add one
// (this can happen when pos_vdivs==neg_vdivs==0)
// If there is still no positive div when we need it, add one
// (this can happen when pos_vdivs==neg_vdivs==0)
- if ((max > 0) && (pos_vdivs_ == 0))
+ if ((max > 0) && (pos_vdivs_ == 0))
{
pos_vdivs_ = 1;
pos_vdivs_ = 1;
+ owner_->extents_changed(false, true);
+ }
// If there is still no negative div when we need it, add one
// (this can happen when pos_vdivs was 0 or 1 when trying to split)
// If there is still no negative div when we need it, add one
// (this can happen when pos_vdivs was 0 or 1 when trying to split)
- if ((min < 0) && (neg_vdivs_ == 0))
+ if ((min < 0) && (neg_vdivs_ == 0))
{
neg_vdivs_ = 1;
neg_vdivs_ = 1;
+ owner_->extents_changed(false, true);
+ }
double min_value_per_div;
if ((pos_vdivs_ > 0) && (neg_vdivs_ > 0))
double min_value_per_div;
if ((pos_vdivs_ > 0) && (neg_vdivs_ > 0))
@@
-723,11
+727,8
@@
void AnalogSignal::on_samples_added()
{
perform_autoranging(false, false);
{
perform_autoranging(false, false);
- if (owner_) {
- // Call order is important, otherwise the lazy event handler won't work
- owner_->extents_changed(false, true);
+ if (owner_)
owner_->row_item_appearance_changed(false, true);
owner_->row_item_appearance_changed(false, true);
- }
}
void AnalogSignal::on_pos_vdivs_changed(int vdivs)
}
void AnalogSignal::on_pos_vdivs_changed(int vdivs)