bug fix filename with an underscore was a problem

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@237 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
l_maliakal_d 2013-09-20 13:11:57 +00:00
parent e7633f1e04
commit e3df740901
2 changed files with 7 additions and 7 deletions

View File

@ -110,9 +110,8 @@ private slots:
void setNumMeasurements(int num); void setNumMeasurements(int num);
/** Set file name /** Set file name
* @param fName name of file
*/ */
void setFileName(const QString& fName); void setFileName();
/** Set index of file name /** Set index of file name
* @param index index of selection * @param index index of selection

View File

@ -218,7 +218,7 @@ void qTabMeasurement::Initialization(){
//Number of Measurements //Number of Measurements
connect(spinNumMeasurements,SIGNAL(valueChanged(int)), this, SLOT(setNumMeasurements(int))); connect(spinNumMeasurements,SIGNAL(valueChanged(int)), this, SLOT(setNumMeasurements(int)));
//File Name //File Name
connect(dispFileName, SIGNAL(textChanged(const QString&)),this, SLOT(setFileName(const QString&))); connect(dispFileName, SIGNAL(editingFinished()),this, SLOT(setFileName()));
//File Index //File Index
connect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(setRunIndex(int))); connect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(setRunIndex(int)));
//Start/Stop Acquisition //Start/Stop Acquisition
@ -362,15 +362,16 @@ void qTabMeasurement::UpdateProgress(){
//------------------------------------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------------------------------------
void qTabMeasurement::setFileName(const QString& fName){ void qTabMeasurement::setFileName(){
QString fName = dispFileName->text();
#ifdef VERBOSE #ifdef VERBOSE
cout << "Setting File name to " << fName.toAscii().constData() << endl; cout << "Setting File name to " << fName.toAscii().constData() << endl;
#endif #endif
myDet->setFileName(fName.toAscii().data()); myDet->setFileName(fName.toAscii().data());
disconnect(dispFileName, SIGNAL(textChanged(const QString&)),this, SLOT(setFileName(const QString&))); disconnect(dispFileName, SIGNAL(editingFinished()),this, SLOT(setFileName()));
dispFileName->setText(QString(myDet->getFileName().c_str())); dispFileName->setText(QString(myDet->getFileName().c_str()));
connect(dispFileName, SIGNAL(textChanged(const QString&)),this, SLOT(setFileName(const QString&))); connect(dispFileName, SIGNAL(editingFinished()),this, SLOT(setFileName()));
qDefs::checkErrorMessage(myDet,"qTabMeasurement::setFileName"); qDefs::checkErrorMessage(myDet,"qTabMeasurement::setFileName");
} }
@ -752,7 +753,7 @@ void qTabMeasurement::EnableFileWrite(bool enable){
#endif #endif
myDet->enableWriteToFile(enable); myDet->enableWriteToFile(enable);
dispFileName->setEnabled(enable); dispFileName->setEnabled(enable);
if(enable) setFileName(dispFileName->text()); if(enable) setFileName();
myPlot->SetEnableFileWrite(enable); myPlot->SetEnableFileWrite(enable);
disconnect(chkFile, SIGNAL(toggled(bool)), this, SLOT(EnableFileWrite(bool))); disconnect(chkFile, SIGNAL(toggled(bool)), this, SLOT(EnableFileWrite(bool)));