ang conversion enables positions without having to do refresh

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@73 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
l_maliakal_d 2012-09-25 13:05:07 +00:00
parent 4143c648d8
commit 4e4b8b9beb

View File

@ -139,6 +139,32 @@ void qTabActions::SetupWidgetWindow(){
}
//load positions
if(lblName[NumPositions]->isEnabled()){
//delete existing positions
if (positions) delete [] positions;
//get number of positions
int numPos=myDet->getPositions();
comboPos->setMaxCount(numPos);
//set the number of positions in the gui
spinNumPos->setValue(numPos);
positions=new double[numPos];
//load the positions
myDet->getPositions(positions);
//delete the combolist and reload it
comboPos->setEnabled(numPos);
lblPosList->setEnabled(numPos);
btnDelete->setEnabled(numPos);
lblPosList->setText("List of Positions: ");
lblPosList->setPalette(normal);
for(int i=0;i<comboPos->count();i++) comboPos->removeItem(i);
for(int i=0;i<numPos;i++) comboPos->insertItem(i,QString("%1").arg(positions[i]));
}
}