projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement customizable cursor fill color
[pulseview.git]
/
pv
/
views
/
trace
/
analogsignal.cpp
diff --git
a/pv/views/trace/analogsignal.cpp
b/pv/views/trace/analogsignal.cpp
index 5b3241d2d35beb1aa4a552743aff00705d5319ac..ae3fe8d28e20e1dfd5c1802b473e9018d0bf7e9a 100644
(file)
--- a/
pv/views/trace/analogsignal.cpp
+++ b/
pv/views/trace/analogsignal.cpp
@@
-236,7
+236,7
@@
void AnalogSignal::paint_back(QPainter &p, ViewItemPaintParams &pp)
paint_axis(p, pp, get_visual_y());
} else {
paint_axis(p, pp, get_visual_y());
} else {
-
Trace
::paint_back(p, pp);
+
Signal
::paint_back(p, pp);
paint_axis(p, pp, get_visual_y());
}
}
paint_axis(p, pp, get_visual_y());
}
}
@@
-614,10
+614,11
@@
void AnalogSignal::paint_logic_mid(QPainter &p, ViewItemPaintParams &pp)
if (fill_high_areas) {
// Any edge terminates a high area
if (fill_high_areas) {
// Any edge terminates a high area
- const int width = x - rising_edge_x;
- if (rising_edge_seen && (width > 0)) {
- high_rects.emplace_back(rising_edge_x, high_offset,
- width, signal_height);
+ if (rising_edge_seen) {
+ const int width = x - rising_edge_x;
+ if (width > 0)
+ high_rects.emplace_back(rising_edge_x, high_offset,
+ width, signal_height);
rising_edge_seen = false;
}
rising_edge_seen = false;
}
@@
-787,7
+788,7
@@
void AnalogSignal::update_conversion_widgets()
conv_threshold_cb_->blockSignals(true);
// Set available options depending on chosen conversion
conv_threshold_cb_->blockSignals(true);
// Set available options depending on chosen conversion
- for (pair<QString, int> preset : presets)
+ for (pair<QString, int>
&
preset : presets)
conv_threshold_cb_->addItem(preset.first, preset.second);
map < QString, QVariant > options = base_->get_conversion_options();
conv_threshold_cb_->addItem(preset.first, preset.second);
map < QString, QVariant > options = base_->get_conversion_options();
@@
-856,7
+857,7
@@
void AnalogSignal::perform_autoranging(bool keep_divs, bool force_update)
static double prev_min = 0, prev_max = 0;
double min = 0, max = 0;
static double prev_min = 0, prev_max = 0;
double min = 0, max = 0;
- for (
shared_ptr<pv::data::AnalogSegment>
segment : segments) {
+ for (
const shared_ptr<pv::data::AnalogSegment>&
segment : segments) {
pair<double, double> mm = segment->get_min_max();
min = std::min(min, mm.first);
max = std::max(max, mm.second);
pair<double, double> mm = segment->get_min_max();
min = std::min(min, mm.first);
max = std::max(max, mm.second);