X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fwidgets%2Ftimestampspinbox.cpp;h=fd52c504e240d1d907d1e47cdeca0ad9d2c0ab79;hb=379f6ccf486b331a809dde730695af26ec85991d;hp=703da6ea13cb51aaf2f9581c4cbbbbea7cc19def;hpb=806d3e1eb3d60e93ff95d23e79588a0486730967;p=pulseview.git diff --git a/pv/widgets/timestampspinbox.cpp b/pv/widgets/timestampspinbox.cpp index 703da6e..fd52c50 100644 --- a/pv/widgets/timestampspinbox.cpp +++ b/pv/widgets/timestampspinbox.cpp @@ -14,8 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * along with this program; if not, see . */ #include "timestampspinbox.hpp" @@ -104,8 +103,7 @@ void TimestampSpinBox::on_editingFinished() captures.removeFirst(); // remove entire match QString str = captures.join(""); setValue(pv::util::Timestamp(str.toStdString())); - } - else { + } else { // replace the malformed entered string with the old value updateEdit(); } @@ -113,10 +111,10 @@ void TimestampSpinBox::on_editingFinished() void TimestampSpinBox::updateEdit() { - QString newtext = pv::util::format_si_value( - value_, "s", 8, precision_); + QString newtext = pv::util::format_time_si( + value_, pv::util::SIPrefix::none, precision_); lineEdit()->setText(newtext); } -} // widgets -} // pv +} // namespace widgets +} // namespace pv