diff options
author | Carl Hetherington <carl@carlh.net> | 2010-11-04 01:56:56 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-11-04 01:56:56 +0000 |
commit | b842ba42f537fd8055e9da4cf46bf0f3750bbc1f (patch) | |
tree | 1b7596e5ebf90585d9f437c34eb3e5205a9b8b42 /gtk2_ardour/audio_region_editor.cc | |
parent | b5ab2e030b3c8de6c7f41c8d533de2462437ce7c (diff) |
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
Diffstat (limited to 'gtk2_ardour/audio_region_editor.cc')
-rw-r--r-- | gtk2_ardour/audio_region_editor.cc | 8 |
1 files changed, 5 insertions, 3 deletions
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 <boost/lexical_cast.hpp> - #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<string> (p)); + stringstream s; + s.precision (2); + s.setf (ios::fixed, ios::floatfield); + s << p; + _peak_amplitude.set_text (s.str ()); } |