Fix bug in parameter initialization table.

This commit is contained in:
salman 2009-09-07 09:49:46 +00:00
parent f630ef1d3b
commit fff8ea52bd
4 changed files with 11 additions and 19 deletions

View File

@ -1147,6 +1147,7 @@ sub PrepParamTable {
$Param=$Param."_".$iRun;
# Check if this parameter has been initialized befor. If not take from defaults
$value = $All{"$Param"};
print "$Param=$value\n";
if ( $value ne "" ) {
$error = $All{"$erradd$Param"};
$minvalue = $All{"$Param$minadd"};
@ -1155,6 +1156,7 @@ sub PrepParamTable {
# I need this although it is already in the MSR.pm module, just for this table
# We can remove it from the MSR module later...
# Or keep in the MSR as function ??
print "I am here. Why?\n";
$value = $Defaults{$Param_ORG};
$error = $Defaults{ join( "", $erradd, $Param_ORG ) };
$minvalue = $Defaults{ join("", $Param_ORG, $minadd ) };

View File

@ -1,6 +1,6 @@
# Form implementation generated from reading ui file 'MuSRFit.ui'
#
# Created: Sun Sep 6 15:38:11 2009
# Created: Mon Sep 7 11:44:59 2009
# by: The PerlQt User Interface Compiler (puic)
#
# WARNING! All changes made in this file will be lost!
@ -569,7 +569,7 @@ sub NEW
setName("MuSRFitform" );
}
setSizePolicy(Qt::SizePolicy(3, 3, 1, 1, this->sizePolicy()->hasHeightForWidth()) );
setMinimumSize(Qt::Size(23, 222) );
setMinimumSize(Qt::Size(21, 227) );
setIcon($image0 );
setCentralWidget(Qt::Widget(this, "qt_central_widget"));
@ -2447,7 +2447,7 @@ sub InitializeTab
# Fill the table with labels and values of parametr
for (my $PCount=0;$PCount<$NParam;$PCount++) {
my ($Param,$value,$error,$minvalue,$maxvalue,$RUN) = split(/,/,$PTable{$PCount});
InitParamTable->verticalHeader()->setLabel( $PCount,"$RUN: $Param");
InitParamTable->verticalHeader()->setLabel( $PCount,"$Param");
# InitParamTable->verticalHeader()->setLabel( $PCount,"$Param");
InitParamTable->showRow($PCount);
InitParamTable->setText($PCount,0,$value);

View File

@ -22,8 +22,8 @@
</property>
<property name="minimumSize">
<size>
<width>23</width>
<height>222</height>
<width>21</width>
<height>227</height>
</size>
</property>
<property name="caption">
@ -2855,33 +2855,21 @@
<property name="text">
<string>Value</string>
</property>
<property name="pixmap">
<pixmap></pixmap>
</property>
</column>
<column>
<property name="text">
<string>Error</string>
</property>
<property name="pixmap">
<pixmap></pixmap>
</property>
</column>
<column>
<property name="text">
<string>Min</string>
</property>
<property name="pixmap">
<pixmap></pixmap>
</property>
</column>
<column>
<property name="text">
<string>Max</string>
</property>
<property name="pixmap">
<pixmap></pixmap>
</property>
</column>
<property name="name">
<cstring>InitParamTable</cstring>

View File

@ -546,8 +546,10 @@ void MuSRFitform::InitializeTab()
# Fill the table with labels and values of parametr
for (my $PCount=0;$PCount<$NParam;$PCount++) {
my ($Param,$value,$error,$minvalue,$maxvalue,$RUN) = split(/,/,$PTable{$PCount});
InitParamTable->verticalHeader()->setLabel( $PCount,"$RUN: $Param");
# InitParamTable->verticalHeader()->setLabel( $PCount,"$Param");
# If you use this then reading the parameters from the table is a problem
# You need to extract the correct parameter name from the row label
# InitParamTable->verticalHeader()->setLabel( $PCount,"$RUN: $Param");
InitParamTable->verticalHeader()->setLabel( $PCount,"$Param");
InitParamTable->showRow($PCount);
InitParamTable->setText($PCount,0,$value);
InitParamTable->setText($PCount,1,$error);