[Kstars-devel] branches/kstars/unfrozen/kstars/kstars

Jason Harris kstars at 30doradus.org
Tue Jul 1 06:31:26 CEST 2008


SVN commit 826606 by harris:

porting fix from trunk, revision 825021.  Quoting original commit message:

Fix bug that made it impossible to compute FOV angles of eyepieces and cameras in
the NewFOV tool.

CCMAIL: kstars-devel at kde.org



 M  +3 -6      fovdialog.cpp  


--- branches/kstars/unfrozen/kstars/kstars/fovdialog.cpp #826605:826606
@@ -224,14 +224,11 @@
 void NewFOV::slotComputeFOV() {
     KStars *ks = (KStars*)(parent()->parent());
 
-    if ( sender() == ks->actionCollection()->action( "ComputeEyeFOV" ) ) kDebug() << "A";
-    if ( sender() == ks->actionCollection()->action( "ComputeEyeFOV" ) && ui->TLength1->value() > 0.0 ) kDebug() << "B";
-
-    if ( sender() == ks->actionCollection()->action( "ComputeEyeFOV" ) && ui->TLength1->value() > 0.0 )
+    if ( sender() == ui->ComputeEyeFOV && ui->TLength1->value() > 0.0 )
         ui->FOVEdit->setText( KGlobal::locale()->formatNumber( ui->EyeFOV->value() * ui->EyeLength->value() / ui->TLength1->value() ) );
-    else if ( sender() == ks->actionCollection()->action( "ComputeCameraFOV" ) && ui->TLength2->value() > 0.0 )
+    else if ( sender() == ui->ComputeCameraFOV && ui->TLength2->value() > 0.0 )
         ui->FOVEdit->setText( KGlobal::locale()->formatNumber( ui->ChipSize->value() * 3438.0 / ui->TLength2->value() ) );
-    else if ( sender() == ks->actionCollection()->action( "ComputeHPBW" ) && ui->RTDiameter->value() > 0.0 && ui->WaveLength->value() > 0.0 ) {
+    else if ( sender() == ui->ComputeHPBW && ui->RTDiameter->value() > 0.0 && ui->WaveLength->value() > 0.0 ) {
         ui->FOVEdit->setText( KGlobal::locale()->formatNumber( 34.34 * 1.2 * ui->WaveLength->value() / ui->RTDiameter->value() ) );
         // Beam width for an antenna is usually a circle on the sky.
         ui->ShapeBox->setCurrentIndex(4);


More information about the Kstars-devel mailing list