Commit be8f0853 authored by bonnell's avatar bonnell

Increase precision of entered floats/doubles in plot/operator windows. Resolves #2201.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@26233 18c085ea-50e0-402c-830e-de6fd14e8384
parent 8a2f9ebf
......@@ -46,6 +46,7 @@
#include <stdlib.h>
#endif
#include <clocale>
#include <iomanip>
#include <visit-config.h>
// ****************************************************************************
......@@ -243,6 +244,10 @@ ConfigManager::WriteEscapedString(std::ostream &out, const std::string &str)
// Brad Whitlock, Thu Oct 28 12:16:40 PDT 2010
// Only quote single strings on write if they contain spaces.
//
// Kathleen Biagas, Thu Apr 9 07:19:54 MST 2015
// Set precision for floats and doubles (to highest value that doesn't
// convert '0.009' to '0.00899999999'.
//
// ****************************************************************************
void
......@@ -263,10 +268,10 @@ ConfigManager::WriteData(std::ostream& out, DataNode *node)
out << node->AsLong();
break;
case FLOAT_NODE:
out << node->AsFloat();
out << std::setprecision(7) << node->AsFloat();
break;
case DOUBLE_NODE:
out << node->AsDouble();
out << std::setprecision(15) << node->AsDouble();
break;
case STRING_NODE:
{ // new scope
......@@ -316,14 +321,14 @@ ConfigManager::WriteData(std::ostream& out, DataNode *node)
{ // new scope
const float *fptr = node->AsFloatArray();
for(int i = 0; i < node->GetLength(); ++i)
out << *fptr++ << " ";
out << std::setprecision(7) << *fptr++ << " ";
}
break;
case DOUBLE_ARRAY_NODE:
{ // new scope
const double *dptr = node->AsDoubleArray();
for(int i = 0; i < node->GetLength(); ++i)
out << *dptr++ << " ";
out << std::setprecision(15) << *dptr++ << " ";
}
break;
case STRING_ARRAY_NODE:
......@@ -377,14 +382,14 @@ ConfigManager::WriteData(std::ostream& out, DataNode *node)
{ // new scope
const floatVector &fvec = node->AsFloatVector();
for(size_t i = 0; i < fvec.size(); ++i)
out << fvec[i] << " ";
out << std::setprecision(7) << fvec[i] << " ";
}
break;
case DOUBLE_VECTOR_NODE:
{ // new scope
const doubleVector &dvec = node->AsDoubleVector();
for(size_t i = 0; i < dvec.size(); ++i)
out << dvec[i] << " ";
out << std::setprecision(15) << dvec[i] << " ";
}
break;
case STRING_VECTOR_NODE:
......
......@@ -909,16 +909,18 @@ GUIBase::ResettingError(const QString &name, const QString &val)
// Creation: Thu Jun 19 10:35:31 PDT 2008
//
// Modifications:
// Kathleen Biagas, Wed Apr 8 08:22:33 PDT 2015
// Added precision argument for 'setNum' call.
//
// ****************************************************************************
QString
GUIBase::DoublesToQString(const double *vals, int nvals)
GUIBase::DoublesToQString(const double *vals, int nvals, int precision)
{
QString s;
for(int i = 0; i < nvals; ++i)
{
s += QString().setNum(vals[i]);
s += QString().setNum(vals[i], 'g', precision);
if(i < nvals-1)
s += " ";
}
......@@ -944,16 +946,18 @@ GUIBase::DoublesToQString(const double *vals, int nvals)
// Creation: Thu Jun 19 10:35:31 PDT 2008
//
// Modifications:
// Kathleen Biagas, Wed Apr 8 08:22:33 PDT 2015
// Added precision argument for 'setNum' call.
//
// ****************************************************************************
QString
GUIBase::DoublesToQString(const doubleVector &vals)
GUIBase::DoublesToQString(const doubleVector &vals, int precision)
{
QString s;
for(size_t i = 0; i < vals.size(); ++i)
{
s += QString().setNum(vals[i]);
s += QString().setNum(vals[i], 'g', precision);
if(i < vals.size()-1)
s += " ";
}
......@@ -978,13 +982,15 @@ GUIBase::DoublesToQString(const doubleVector &vals)
// Creation: Thu Jun 19 10:35:31 PDT 2008
//
// Modifications:
// Kathleen Biagas, Wed Apr 8 08:22:33 PDT 2015
// Added precision argument for 'setNum' call.
//
// ****************************************************************************
QString
GUIBase::DoubleToQString(double val)
GUIBase::DoubleToQString(double val, int precision)
{
return QString().setNum(val);
return QString().setNum(val, 'g', precision);
}
// ****************************************************************************
......@@ -1006,16 +1012,18 @@ GUIBase::DoubleToQString(double val)
// Creation: Thu Jun 19 10:35:31 PDT 2008
//
// Modifications:
// Kathleen Biagas, Wed Apr 8 08:22:33 PDT 2015
// Added precision argument for 'setNum' call.
//
// ****************************************************************************
QString
GUIBase::FloatsToQString(const float *vals, int nvals)
GUIBase::FloatsToQString(const float *vals, int nvals, int precision)
{
QString s;
for(int i = 0; i < nvals; ++i)
{
s += QString().setNum(vals[i]);
s += QString().setNum(vals[i], 'g', precision);
if(i < nvals-1)
s += " ";
}
......@@ -1040,13 +1048,15 @@ GUIBase::FloatsToQString(const float *vals, int nvals)
// Creation: Thu Jun 19 10:35:31 PDT 2008
//
// Modifications:
// Kathleen Biagas, Wed Apr 8 08:22:33 PDT 2015
// Added precision argument for 'setNum' call.
//
// ****************************************************************************
QString
GUIBase::FloatToQString(float val)
GUIBase::FloatToQString(float val, int precision)
{
return QString().setNum(val);
return QString().setNum(val, 'g', precision);
}
// ****************************************************************************
......
......@@ -112,6 +112,9 @@ class QvisHelpWindow;
// Cyrus Harrison, Tue Aug 26 07:46:41 PDT 2008
// Made helper functions public static so other classes can utilize them.
//
// Kathleen Biagas, Thu Apr 9 11:48:50 PDT 2015
// Add precision argument to FloatsToQString and DoublesToQString.
//
// ****************************************************************************
class GUI_API GUIBase
......@@ -124,11 +127,11 @@ public:
void ConnectMessageAttr(MessageAttributes *attr);
// Helpers for converting between values and qstrings
static QString FloatsToQString(const float *, int);
static QString FloatToQString(float);
static QString DoublesToQString(const double *, int);
static QString DoublesToQString(const doubleVector &);
static QString DoubleToQString(double);
static QString FloatsToQString(const float *, int, int precision=7);
static QString FloatToQString(float, int precision=7);
static QString DoublesToQString(const double *, int, int precision=16);
static QString DoublesToQString(const doubleVector &, int precision=16);
static QString DoubleToQString(double, int precision=16);
static QString IntsToQString(const int *, int);
static QString IntsToQString(const intVector &);
static QString IntToQString(int);
......
......@@ -44,6 +44,7 @@
#include <QLayout>
#include <QRadioButton>
#include <GUIBase.h>
#include <QNarrowLineEdit.h>
#include <QvisVariableButton.h>
......@@ -483,7 +484,10 @@ QvisPointControl::SetPointSizePixels(int val)
// Creation: Wed Jul 20 14:48:01 PST 2005
//
// Modifications:
//
// Kathleen Biagas, Thu Apr 9 07:19:54 MST 2015
// Use helper function DoubleToQString for consistency in formatting across
// all windows.
//
// ****************************************************************************
void
......@@ -491,15 +495,11 @@ QvisPointControl::UpdateSizeText()
{
if(lastGoodPointType < POINT_TYPE_POINTS)
{
QString temp;
temp.sprintf("%g", lastGoodSize);
sizeLineEdit->setText(temp);
sizeLineEdit->setText(GUIBase::DoubleToQString(lastGoodSize));
}
else
{
QString temp;
temp.sprintf("%d", lastGoodSizePixels);
sizeLineEdit->setText(temp);
sizeLineEdit->setText(GUIBase::IntToQString(lastGoodSizePixels));
}
}
......
......@@ -660,15 +660,15 @@ QvisFTLEWindow::CreateAdvancedTab(QWidget *pageAdvanced)
// Creation: Mon Oct 21 14:19:00 PST 2002
//
// Modifications:
// Kathleen Biagas, Thu Apr 9 07:19:54 MST 2015
// Use helper function DoubleToQString for consistency in formatting across
// all windows.
//
// ****************************************************************************
void
QvisFTLEWindow::UpdateWindow(bool doAll)
{
QString temp;
QColor tempcolor;
for(int i = 0; i < FTLEAtts->NumAttributes(); ++i)
{
if(!doAll)
......@@ -741,8 +741,7 @@ QvisFTLEWindow::UpdateWindow(bool doAll)
EndPosition->setText(DoublesToQString(FTLEAtts->GetEndPosition(), 3));
break;
case FTLEAttributes::ID_maxStepLength:
temp.setNum(FTLEAtts->GetMaxStepLength());
maxStepLength->setText(temp);
maxStepLength->setText(DoubleToQString(FTLEAtts->GetMaxStepLength()));
break;
case FTLEAttributes::ID_limitMaximumTimestep:
limitMaxTimeStep->blockSignals(true);
......@@ -761,12 +760,10 @@ QvisFTLEWindow::UpdateWindow(bool doAll)
maxTimeStep->blockSignals(false);
break;
case FTLEAttributes::ID_maxTimeStep:
temp.setNum(FTLEAtts->GetMaxTimeStep());
maxTimeStep->setText(temp);
maxTimeStep->setText(DoubleToQString(FTLEAtts->GetMaxTimeStep()));
break;
case FTLEAttributes::ID_maxSteps:
temp.setNum(FTLEAtts->GetMaxSteps());
maxSteps->setText(temp);
maxSteps->setText(IntToQSTring(FTLEAtts->GetMaxSteps()));
break;
case FTLEAttributes::ID_terminationType:
limitButtonGroup->blockSignals(true);
......@@ -778,16 +775,13 @@ QvisFTLEWindow::UpdateWindow(bool doAll)
maxSize->setEnabled(FTLEAtts->GetTerminationType()==2);
break;
case FTLEAttributes::ID_termSize:
temp.setNum(FTLEAtts->GetTermSize());
maxSize->setText(temp);
maxSize->setText(DoubleToQString(FTLEAtts->GetTermSize()));
break;
case FTLEAttributes::ID_termDistance:
temp.setNum(FTLEAtts->GetTermDistance());
maxDistance->setText(temp);
maxDistance->setText(DoubleToQString(FTLEAtts->GetTermDistance()));
break;
case FTLEAttributes::ID_termTime:
temp.setNum(FTLEAtts->GetTermTime(), 'g', 16);
maxTime->setText(temp);
maxTime->setText(DoubleToQString(FTLEAtts->GetTermTime()));
break;
case FTLEAttributes::ID_velocitySource:
velocitySource->setText(DoublesToQString(FTLEAtts->GetVelocitySource(),3));
......@@ -799,8 +793,7 @@ QvisFTLEWindow::UpdateWindow(bool doAll)
directionType->blockSignals(false);
break;
case FTLEAttributes::ID_relTol:
temp.setNum(FTLEAtts->GetRelTol());
relTol->setText(temp);
relTol->setText(DoubleToQString(FTLEAtts->GetRelTol()));
break;
case FTLEAttributes::ID_absTolSizeType:
absTolSizeType->blockSignals(true);
......@@ -808,27 +801,23 @@ QvisFTLEWindow::UpdateWindow(bool doAll)
absTolSizeType->blockSignals(false);
if (FTLEAtts->GetAbsTolSizeType() == FTLEAttributes::FractionOfBBox)
{
temp.setNum(FTLEAtts->GetAbsTolBBox());
absTol->setText(temp);
absTol->setText(DoubleToQString(FTLEAtts->GetAbsTolBBox()));
}
if (FTLEAtts->GetAbsTolSizeType() == FTLEAttributes::Absolute)
{
temp.setNum(FTLEAtts->GetAbsTolAbsolute());
absTol->setText(temp);
absTol->setText(DoubleToQString(FTLEAtts->GetAbsTolAbsolute()));
}
break;
case FTLEAttributes::ID_absTolBBox:
if (FTLEAtts->GetAbsTolSizeType() == FTLEAttributes::FractionOfBBox)
{
temp.setNum(FTLEAtts->GetAbsTolBBox());
absTol->setText(temp);
absTol->setText(DoubleToQString(FTLEAtts->GetAbsTolBBox()));
}
break;
case FTLEAttributes::ID_absTolAbsolute:
if (FTLEAtts->GetAbsTolSizeType() == FTLEAttributes::Absolute)
{
temp.setNum(FTLEAtts->GetAbsTolAbsolute());
absTol->setText(temp);
absTol->setText(DoubleToQString(FTLEAtts->GetAbsTolAbsolute()));
}
break;
case FTLEAttributes::ID_fieldType:
......@@ -929,8 +918,7 @@ QvisFTLEWindow::UpdateWindow(bool doAll)
pathlineOverrideStartingTimeFlag->blockSignals(false);
break;
case FTLEAttributes::ID_pathlinesOverrideStartingTime:
temp.setNum(FTLEAtts->GetPathlinesOverrideStartingTime(), 'g', 16);
pathlineOverrideStartingTime->setText(temp);
pathlineOverrideStartingTime->setText(DoubleToQString(FTLEAtts->GetPathlinesOverrideStartingTime()));
break;
case FTLEAttributes::ID_pathlinesCMFE:
pathlineCMFEButtonGroup->blockSignals(true);
......@@ -964,8 +952,7 @@ QvisFTLEWindow::UpdateWindow(bool doAll)
issueWarningForStiffness->blockSignals(false);
break;
case FTLEAttributes::ID_criticalPointThreshold:
temp.setNum(FTLEAtts->GetCriticalPointThreshold());
criticalPointThreshold->setText(temp);
criticalPointThreshold->setText(DoubleToQString(FTLEAtts->GetCriticalPointThreshold()));
break;
}
}
......
......@@ -246,8 +246,6 @@ QvisIsosurfaceWindow::CreateWindowContents()
void
QvisIsosurfaceWindow::UpdateWindow(bool doAll)
{
QString temp;
for(int i = 0; i < atts->NumAttributes(); ++i)
{
if(!doAll)
......
......@@ -824,14 +824,15 @@ QvisLCSWindow::CreateAdvancedTab(QWidget *pageAdvanced)
// Creation: Mon Oct 21 14:19:00 PST 2002
//
// Modifications:
// Kathleen Biagas, Thu Apr 9 07:19:54 MST 2015
// Use helper function DoubleToQString for consistency in formatting across
// all windows.
//
// ****************************************************************************
void
QvisLCSWindow::UpdateWindow(bool doAll)
{
QString temp;
for(int i = 0; i < atts->NumAttributes(); ++i)
{
if(!doAll)
......@@ -904,8 +905,7 @@ QvisLCSWindow::UpdateWindow(bool doAll)
EndPosition->setText(DoublesToQString(atts->GetEndPosition(), 3));
break;
case LCSAttributes::ID_maxStepLength:
temp.setNum(atts->GetMaxStepLength());
maxStepLength->setText(temp);
maxStepLength->setText(DoubleToQString(atts->GetMaxStepLength()));
break;
case LCSAttributes::ID_limitMaximumTimestep:
limitMaxTimeStep->blockSignals(true);
......@@ -924,12 +924,10 @@ QvisLCSWindow::UpdateWindow(bool doAll)
maxTimeStep->blockSignals(false);
break;
case LCSAttributes::ID_maxTimeStep:
temp.setNum(atts->GetMaxTimeStep());
maxTimeStep->setText(temp);
maxTimeStep->setText(DoubleToQString(atts->GetMaxTimeStep()));
break;
case LCSAttributes::ID_maxSteps:
temp.setNum(atts->GetMaxSteps());
maxSteps->setText(temp);
maxSteps->setText(IntToQString(atts->GetMaxSteps()));
break;
case LCSAttributes::ID_terminateByDistance:
......@@ -1059,8 +1057,7 @@ QvisLCSWindow::UpdateWindow(bool doAll)
break;
case LCSAttributes::ID_eigenWeight:
temp.setNum(atts->GetEigenWeight());
eigenWeight->setText(temp);
eigenWeight->setText(DoubleToQString(atts->GetEigenWeight()));
break;
case LCSAttributes::ID_clampLogValues:
......@@ -1079,16 +1076,13 @@ QvisLCSWindow::UpdateWindow(bool doAll)
maxSize->setEnabled(atts->GetTerminationType()==2);
break;
case LCSAttributes::ID_termSize:
temp.setNum(atts->GetTermSize());
maxSize->setText(temp);
maxSize->setText(DoubleToQString(atts->GetTermSize()));
break;
case LCSAttributes::ID_termDistance:
temp.setNum(atts->GetTermDistance());
maxDistance->setText(temp);
maxDistance->setText(DoubleToQString(atts->GetTermDistance()));
break;
case LCSAttributes::ID_termTime:
temp.setNum(atts->GetTermTime(), 'g', 16);
maxTime->setText(temp);
maxTime->setText(DoubleToQString(atts->GetTermTime()));
break;
case LCSAttributes::ID_velocitySource:
velocitySource->setText(DoublesToQString(atts->GetVelocitySource(),3));
......@@ -1100,8 +1094,7 @@ QvisLCSWindow::UpdateWindow(bool doAll)
directionType->blockSignals(false);
break;
case LCSAttributes::ID_relTol:
temp.setNum(atts->GetRelTol());
relTol->setText(temp);
relTol->setText(DoubleToQString(atts->GetRelTol()));
break;
case LCSAttributes::ID_absTolSizeType:
absTolSizeType->blockSignals(true);
......@@ -1109,27 +1102,23 @@ QvisLCSWindow::UpdateWindow(bool doAll)
absTolSizeType->blockSignals(false);
if (atts->GetAbsTolSizeType() == LCSAttributes::FractionOfBBox)
{
temp.setNum(atts->GetAbsTolBBox());
absTol->setText(temp);
absTol->setText(DoubleToQString(atts->GetAbsTolBBox()));
}
if (atts->GetAbsTolSizeType() == LCSAttributes::Absolute)
{
temp.setNum(atts->GetAbsTolAbsolute());
absTol->setText(temp);
absTol->setText(DoubleToQString(atts->GetAbsTolAbsolute()));
}
break;
case LCSAttributes::ID_absTolBBox:
if (atts->GetAbsTolSizeType() == LCSAttributes::FractionOfBBox)
{
temp.setNum(atts->GetAbsTolBBox());
absTol->setText(temp);
absTol->setText(DoubleToQString(atts->GetAbsTolBBox()));
}
break;
case LCSAttributes::ID_absTolAbsolute:
if (atts->GetAbsTolSizeType() == LCSAttributes::Absolute)
{
temp.setNum(atts->GetAbsTolAbsolute());
absTol->setText(temp);
absTol->setText(DoubleToQString(atts->GetAbsTolAbsolute()));
}
break;
case LCSAttributes::ID_auxiliaryGrid:
......@@ -1206,16 +1195,13 @@ QvisLCSWindow::UpdateWindow(bool doAll)
break;
case LCSAttributes::ID_thresholdLimit:
temp.setNum(atts->GetThresholdLimit(), 'g', 16);
thresholdLimit->setText(temp);
thresholdLimit->setText(DoubleToQString(atts->GetThresholdLimit()));
break;
case LCSAttributes::ID_radialLimit:
temp.setNum(atts->GetRadialLimit(), 'g', 16);
radialLimit->setText(temp);
radialLimit->setText(DoubleToQString(atts->GetRadialLimit()));
break;
case LCSAttributes::ID_boundaryLimit:
temp.setNum(atts->GetBoundaryLimit(), 'g', 16);
boundaryLimit->setText(temp);
boundaryLimit->setText(DoubleToQString(atts->GetBoundaryLimit()));
break;
case LCSAttributes::ID_seedLimit:
seedLimit->blockSignals(true);
......@@ -1265,12 +1251,10 @@ QvisLCSWindow::UpdateWindow(bool doAll)
pathlineOverrideStartingTimeFlag->blockSignals(false);
break;
case LCSAttributes::ID_pathlinesOverrideStartingTime:
temp.setNum(atts->GetPathlinesOverrideStartingTime(), 'g', 16);
pathlineOverrideStartingTime->setText(temp);
pathlineOverrideStartingTime->setText(DoubleToQString(atts->GetPathlinesOverrideStartingTime()));
break;
case LCSAttributes::ID_pathlinesPeriod:
temp.setNum(atts->GetPathlinesPeriod(), 'g', 16);
pathlinePeriod->setText(temp);
pathlinePeriod->setText(DoubleToQString(atts->GetPathlinesPeriod()));
break;
case LCSAttributes::ID_pathlinesCMFE:
pathlineCMFEButtonGroup->blockSignals(true);
......@@ -1317,8 +1301,7 @@ QvisLCSWindow::UpdateWindow(bool doAll)
break;
case LCSAttributes::ID_criticalPointThreshold:
temp.setNum(atts->GetCriticalPointThreshold());
criticalPointThreshold->setText(temp);
criticalPointThreshold->setText(DoubleToQString(atts->GetCriticalPointThreshold()));
break;
}
}
......@@ -1498,7 +1481,7 @@ void
QvisLCSWindow::GetCurrentValues(int which_widget)
{
bool doAll = (which_widget == -1);
QString msg, temp;
QString msg;
// Do resolution
if(which_widget == LCSAttributes::ID_Resolution || doAll)
......
......@@ -1058,14 +1058,15 @@ QvisPoincareWindow::CreateAdvancedTab(QWidget *pageAdvanced)
// Creation: omitted
//
// Modifications:
//
// Kathleen Biagas, Thu Apr 9 07:19:54 MST 2015
// Use helper function DoubleToQString for consistency in formatting across
// all windows.
//
// ****************************************************************************
void
QvisPoincareWindow::UpdateWindow(bool doAll)
{
QString temp;
for(int i = 0; i < atts->NumAttributes(); ++i)
{
if(!doAll)
......@@ -1114,8 +1115,7 @@ QvisPoincareWindow::UpdateWindow(bool doAll)
puncturePeriodTolerance->setText(DoubleToQString(atts->GetPuncturePeriodTolerance()));
break;
case PoincareAttributes::ID_maxSteps:
temp.setNum(atts->GetMaxSteps());
maxSteps->setText(temp);
maxSteps->setText(IntToQString(atts->GetMaxSteps()));
break;
case PoincareAttributes::ID_terminateByTime:
limitMaxTime->blockSignals(true);
......@@ -1124,8 +1124,7 @@ QvisPoincareWindow::UpdateWindow(bool doAll)
maxTime->setEnabled(atts->GetTerminateByTime());
break;
case PoincareAttributes::ID_termTime:
temp.setNum(atts->GetTermTime(), 'g', 16);
maxTime->setText(temp);
maxTime->setText(DoubleToQString(atts->GetTermTime()));
break;
case PoincareAttributes::ID_puncturePlane:
puncturePlaneButtonGroup->blockSignals(true);
......@@ -1288,31 +1287,23 @@ QvisPoincareWindow::UpdateWindow(bool doAll)
absTolSizeType->blockSignals(false);
if (atts->GetAbsTolSizeType() == PoincareAttributes::FractionOfBBox)
{
QString temp;
temp.setNum(atts->GetAbsTolBBox());
absTol->setText(temp);
absTol->setText(DoubleToQString(atts->GetAbsTolBBox()));
}
if (atts->GetAbsTolSizeType() == PoincareAttributes::Absolute)
{
QString temp;
temp.setNum(atts->GetAbsTolAbsolute());
absTol->setText(temp);
absTol->setText(DoubleToQString(atts->GetAbsTolAbsolute()));
}
break;
case PoincareAttributes::ID_absTolBBox:
if (atts->GetAbsTolSizeType() == PoincareAttributes::FractionOfBBox)
{
QString temp;
temp.setNum(atts->GetAbsTolBBox());
absTol->setText(temp);
absTol->setText(DoubleToQString(atts->GetAbsTolBBox()));
}
break;
case PoincareAttributes::ID_absTolAbsolute:
if (atts->GetAbsTolSizeType() == PoincareAttributes::Absolute)
{
QString temp;
temp.setNum(atts->GetAbsTolAbsolute());
absTol->setText(temp);
absTol->setText(DoubleToQString(atts->GetAbsTolAbsolute()));
}
break;
// case PoincareAttributes::ID_coordinateSystem:
......@@ -1514,12 +1505,10 @@ QvisPoincareWindow::UpdateWindow(bool doAll)
pathlineOverrideStartingTimeFlag->blockSignals(false);
break;
case PoincareAttributes::ID_pathlinesOverrideStartingTime:
temp.setNum(atts->GetPathlinesOverrideStartingTime(), 'g', 16);
pathlineOverrideStartingTime->setText(temp);
pathlineOverrideStartingTime->setText(DoubleToQString(atts->GetPathlinesOverrideStartingTime()));
break;
case PoincareAttributes::ID_pathlinesPeriod:
temp.setNum(atts->GetPathlinesPeriod(), 'g', 16);
pathlinePeriod->setText(temp);
pathlinePeriod->setText(DoubleToQString(atts->GetPathlinesPeriod()));
break;
case PoincareAttributes::ID_pathlinesCMFE:
pathlineCMFEButtonGroup->blockSignals(true);
......@@ -1547,8 +1536,7 @@ QvisPoincareWindow::UpdateWindow(bool doAll)
issueWarningForStiffness->blockSignals(false);
break;
case PoincareAttributes::ID_criticalPointThreshold:
temp.setNum(atts->GetCriticalPointThreshold());
criticalPointThreshold->setText(temp);
criticalPointThreshold->setText(DoubleToQString(atts->GetCriticalPointThreshold()));
break;
}
}
......
......@@ -266,12 +266,15 @@ QvisReflectWindow::CreateWindowContents()
// Cyrus Harrison, Tue Aug 19 08:52:09 PDT 2008
// Qt4 Port.
//
// Kathleen Biagas, Thu Apr 9 07:17:44 MST 2015
// Use helper functions DoubleToQString for consistency in formatting across
// all windows.
//
// ****************************************************************************
void
QvisReflectWindow::UpdateWindow(bool doAll)
{
QString temp;
bool setOctant = false;
bool originIs3D = (operator2WidgetOctants[atts->GetOctant()] > 3);
bool reflection3D = false;
......@@ -299,8 +302,7 @@ QvisReflectWindow::UpdateWindow(bool doAll)
specifiedX->setEnabled(atts->GetUseXBoundary() ? false : true);
break;
case 2: //specifiedX
temp.setNum(atts->GetSpecifiedX());
specifiedX->setText(temp);
specifiedX->setText(DoubleToQString(atts->GetSpecifiedX()));
break;
case 3: //yBound
yUseData->setText((atts->GetOctant()&0x02) ? tr("Use dataset max") : tr("Use dataset min"));
......@@ -308,8 +310,7 @@ QvisReflectWindow::UpdateWindow(bool doAll)
specifiedY->setEnabled(atts->GetUseYBoundary() ? false : true);
break;
case 4: //specifiedY
temp.setNum(atts->GetSpecifiedY());
specifiedY->setText(temp);
specifiedY->setText(DoubleToQString(atts->GetSpecifiedY()));
break;
case 5: //zBound
zUseData->setText((atts->GetOctant()&0x04) ? tr("Use dataset max") : tr("Use dataset min"));
......@@ -317,8 +318,7 @@ QvisReflectWindow::UpdateWindow(bool doAll)
specifiedZ->setEnabled(atts->GetUseZBoundary() ? false : true);
break;
case 6: //specifiedZ
temp.setNum(atts->GetSpecifiedZ());
specifiedZ->setText(temp);
specifiedZ->setText(DoubleToQString(atts->GetSpecifiedZ()));
break;
case 7: //reflections
{
......@@ -443,7 +443,7 @@ void
QvisReflectWindow::GetCurrentValues(int which_field)
{
bool doAll = (which_field == -1);
QString msg, temp;
QString msg;
// Do specifiedX
if(which_field == ReflectAttributes::ID_specifiedX || doAll)
......
......@@ -471,13 +471,15 @@ QvisSliceWindow::CreateWindowContents()
// The doAll flag shouldn't cause this function to exit early.
// (First window initialization wasn't updating this window.)
//
// Kathleen Biagas, Thu Apr 9 07:19:54 MST 2015
// Use helper function DoubleToQString for consistency in formatting across
// all windows.
//
// ****************************************************************************
void
QvisSliceWindow::UpdateWindow(bool doAll)
{
QString temp;
if (!doAll && selectedSubject == fileServer)
{
UpdateMeshNames();
......@@ -512,32 +514,26 @@ QvisSliceWindow::UpdateWindow(bool doAll)
originTypeGroup->blockSignals(false);
break;
case SliceAttributes::ID_originPoint:
dptr = sliceAtts->GetOriginPoint();
originPointLineEdit->setText(DoublesToQString(dptr,3));
originPointLineEdit->setText(DoublesToQString(sliceAtts->GetOriginPoint(),3));
break;
case SliceAttributes::ID_originIntercept:
temp.setNum(sliceAtts->GetOriginIntercept());
originInterceptLineEdit->setText(temp);
originInterceptLineEdit->setText(DoubleToQString(sliceAtts->GetOriginIntercept()));
break;
case SliceAttributes::ID_originPercent:
temp.setNum(sliceAtts->GetOriginPercent());
originPercentLineEdit->setText(temp);
originPercentLineEdit->setText(DoubleToQString(sliceAtts->GetOriginPercent()));
ival = int(qMin(qMax(0.0,sliceAtts->GetOriginPercent()),100.0));
originPercentSlider->blockSignals(true);