projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Whitespace fixes.
[pulseview.git]
/
pv
/
prop
/
double.cpp
diff --git
a/pv/prop/double.cpp
b/pv/prop/double.cpp
index fdd9a44c06828ff64cf44d67a1b29e4b18268b99..c1e776e1f6c890c21d9d435cbc66316d8976e528 100644
(file)
--- a/
pv/prop/double.cpp
+++ b/
pv/prop/double.cpp
@@
-50,17
+50,19
@@
Double::Double(QString name,
QWidget* Double::get_widget(QWidget *parent)
{
QWidget* Double::get_widget(QWidget *parent)
{
- if(_spin_box)
+ if
(_spin_box)
return _spin_box;
_spin_box = new QDoubleSpinBox(parent);
_spin_box->setDecimals(_decimals);
_spin_box->setSuffix(_suffix);
return _spin_box;
_spin_box = new QDoubleSpinBox(parent);
_spin_box->setDecimals(_decimals);
_spin_box->setSuffix(_suffix);
- if(_range)
+ if
(_range)
_spin_box->setRange(_range->first, _range->second);
_spin_box->setRange(_range->first, _range->second);
- if(_step)
+ if
(_step)
_spin_box->setSingleStep(*_step);
_spin_box->setSingleStep(*_step);
+ _spin_box->setValue(_getter ? _getter() : 0.0);
+
return _spin_box;
}
return _spin_box;
}
@@
-68,7
+70,7
@@
void Double::commit()
{
assert(_setter);
{
assert(_setter);
- if(!_spin_box)
+ if
(!_spin_box)
return;
_setter(_spin_box->value());
return;
_setter(_spin_box->value());