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
This commit is contained in:
Carl Hetherington 2010-11-04 01:56:56 +00:00
parent b5ab2e030b
commit b842ba42f5
1 changed files with 5 additions and 3 deletions

View File

@ -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 ());
}