* ./hurricane/src/hurricane:

- Bug: In DbU, "micro" symbol is "u", not "m".
    - Change: In DbU, uses different precisions on differents units.

  * ./hurricane/src/hviewer:
    - Change: In CellWidget, when drawing a Ruler, display the current Unit
        mode on first & last tick.
This commit is contained in:
Jean-Paul Chaput 2010-01-27 09:43:07 +00:00
parent e6f4c5c508
commit 08333f11fa
2 changed files with 8 additions and 8 deletions

View File

@ -260,16 +260,16 @@ namespace Hurricane {
if ( _stringMode == Grid ) {
unitSymbol = 'g';
snprintf ( buffer, 1024, "%.3f", getGrid(u) );
snprintf ( buffer, 1024, "%.1f", getGrid(u) );
} else if ( _stringMode == Symbolic ) {
unitSymbol = 'l';
snprintf ( buffer, 1024, "%.3f", getLambda(u) );
snprintf ( buffer, 1024, "%.1f", getLambda(u) );
} else if ( _stringMode == Physical ) {
switch ( _stringModeUnitPower ) {
case Pico: unitSymbol = 'p'; break;
case Nano: unitSymbol = 'n'; break;
case Micro: unitSymbol = 'm'; break;
case Milli: unitSymbol = 'M'; break;
case Micro: unitSymbol = 'u'; break;
case Milli: unitSymbol = 'm'; break;
case Unity: unitSymbol = 'U'; break;
case Kilo: unitSymbol = 'k'; break;
default: unitSymbol = '?'; break;

View File

@ -1906,7 +1906,7 @@ namespace Hurricane {
textGrad = DbU::getValueString( gradStep*tick
, DbU::SmartTruncate|((symbolicMode())?DbU::Symbolic:DbU::Grid) );
textGrad.resize ( textGrad.size()-1 );
if ( tick ) textGrad.resize ( textGrad.size()-1 );
drawDisplayText ( QPoint ( pxGrad - 1, pxOrigin.y() + tickLength )
, textGrad.c_str()
@ -1922,7 +1922,7 @@ namespace Hurricane {
textGrad = DbU::getValueString ( angle.getX() - origin.getX()
, DbU::SmartTruncate|((symbolicMode())?DbU::Symbolic:DbU::Grid) );
textGrad.resize ( textGrad.size()-1 );
//textGrad.resize ( textGrad.size()-1 );
drawDisplayText ( QPoint ( pxAngle.x() - 1,pxAngle.y() + tickLength )
, textGrad.c_str()
@ -1966,7 +1966,7 @@ namespace Hurricane {
textGrad = DbU::getValueString( gradStep*tick
, DbU::SmartTruncate|((symbolicMode())?DbU::Symbolic:DbU::Grid) );
textGrad.resize ( textGrad.size()-1 );
if ( tick ) textGrad.resize ( textGrad.size()-1 );
drawDisplayText ( QPoint(pxOrigin.x() - tickLength,pyGrad + 1)
, textGrad.c_str()
@ -1982,7 +1982,7 @@ namespace Hurricane {
textGrad = DbU::getValueString( angle.getY() - origin.getY()
, DbU::SmartTruncate|((symbolicMode())?DbU::Symbolic:DbU::Grid) );
textGrad.resize ( textGrad.size()-1 );
//textGrad.resize ( textGrad.size()-1 );
drawDisplayText ( QPoint(pxOrigin.x() - tickLength,pxAngle.y() + 1)
, textGrad.c_str()