Fix bug in input file generation.

This commit is contained in:
salman 2013-02-05 16:28:57 +00:00
parent 438ca3f007
commit 3740a74381
2 changed files with 13 additions and 4 deletions

View File

@ -399,9 +399,9 @@ sub CreateInpFile()
# Get values from form # Get values from form
my %All = CollectValues(); my %All = CollectValues();
my $projComboBox=$All{"projComboBox"}; my $projectile=this->{ui}->projComboBox->currentText();
$All{"ProjZ"}=sprintf("%6.2f",Chem::Zof($projComboBox)); $All{"ProjZ"}=sprintf("%6.2f",Chem::Zof($projectile));
$All{"ProjAM"}=sprintf("%6.2f",Chem::Massof($projComboBox)); $All{"ProjAM"}=sprintf("%6.2f",Chem::Massof($projectile));
# This is the flag for checking layers # This is the flag for checking layers
my $Check=0; my $Check=0;
@ -539,6 +539,15 @@ sub StartSequenceOne()
my @SdzValues=(); my @SdzValues=();
my $cmd=""; my $cmd="";
if (!$ENV{'TRIMBIN'}) {
# If trim.sp binary is not defined give warning and return
my $Warning = Qt::MessageBox::information( this, "Warning!",
"Warning:\n TrimSP binary is not found.\n Define using the Configuration tab.");
return(0);
}
# Cleanup from old files # Cleanup from old files
if (-e "ausgabe1.inp") { if (-e "ausgabe1.inp") {
system("rm -f ausgabe*"); system("rm -f ausgabe*");

View File

@ -5,7 +5,7 @@
################################################################################# #################################################################################
## Form generated from reading UI file 'TrimSPGUI4.ui' ## Form generated from reading UI file 'TrimSPGUI4.ui'
## ##
## Created: Tue Feb 5 15:16:21 2013 ## Created: Tue Feb 5 16:22:06 2013
## by: Qt User Interface Compiler version 4.8.4 ## by: Qt User Interface Compiler version 4.8.4
## ##
## WARNING! All changes made in this file will be lost when recompiling UI file! ## WARNING! All changes made in this file will be lost when recompiling UI file!