95 |
|
|
96 |
void NumEntryGain::value_changed() |
void NumEntryGain::value_changed() |
97 |
{ |
{ |
98 |
|
const double f = pow(10, spinbutton.get_digits()); |
99 |
|
int new_value = round_to_int(spinbutton.get_value() * f); |
100 |
if (ptr) { |
if (ptr) { |
|
const double f = pow(10, spinbutton.get_digits()); |
|
|
int new_value = round_to_int(spinbutton.get_value() * f); |
|
|
|
|
101 |
if (new_value != round_to_int(*ptr / coeff * f)) |
if (new_value != round_to_int(*ptr / coeff * f)) |
102 |
{ |
{ |
103 |
|
sig_to_be_changed.emit(); |
104 |
*ptr = round_to_int(new_value / f * coeff); |
*ptr = round_to_int(new_value / f * coeff); |
105 |
sig_changed(); |
sig_val_changed.emit(new_value); |
106 |
|
sig_changed.emit(); |
107 |
} |
} |
108 |
|
} else { |
109 |
|
sig_to_be_changed.emit(); |
110 |
|
sig_val_changed.emit(new_value); |
111 |
|
sig_changed.emit(); |
112 |
} |
} |
113 |
} |
} |
114 |
|
|