From b842ba42f537fd8055e9da4cf46bf0f3750bbc1f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 4 Nov 2010 01:56:56 +0000 Subject: Show region peak amplitude to 2 decimal places. Fixes #3519. git-svn-id: svn://localhost/ardour2/branches/3.0@7955 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/audio_region_editor.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gtk2_ardour/audio_region_editor.cc') diff --git a/gtk2_ardour/audio_region_editor.cc b/gtk2_ardour/audio_region_editor.cc index 2fb5ac5697..e47f145c7e 100644 --- a/gtk2_ardour/audio_region_editor.cc +++ b/gtk2_ardour/audio_region_editor.cc @@ -17,8 +17,6 @@ */ -#include - #include "pbd/memento_command.h" #include "pbd/stateful_diff_command.h" #include "pbd/pthread_utils.h" @@ -139,6 +137,10 @@ AudioRegionEditor::peak_amplitude_thread () void AudioRegionEditor::peak_amplitude_found (double p) { - _peak_amplitude.set_text (boost::lexical_cast (p)); + stringstream s; + s.precision (2); + s.setf (ios::fixed, ios::floatfield); + s << p; + _peak_amplitude.set_text (s.str ()); } -- cgit v1.2.3