summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-08-28 15:56:06 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-08-28 15:56:06 (GMT)
commitb214f5b90411b30bfd39d0b6ab11a8080334ac73 (patch)
treec4ae7202d0fcbc57f08fa289edb39b0fa96caa19
parentc9ef30e497c7328f5048d77c67d4483d688945dd (diff)
Fix comets and asteroids not being included despite qualifying for magnitude limit. Always use curly brackets!
-rw-r--r--kstars/tools/obslistwizard.cpp42
1 files changed, 38 insertions, 4 deletions
diff --git a/kstars/tools/obslistwizard.cpp b/kstars/tools/obslistwizard.cpp
index fe9b5cf..2cce241 100644
--- a/kstars/tools/obslistwizard.cpp
+++ b/kstars/tools/obslistwizard.cpp
@@ -689,10 +689,40 @@ void ObsListWizard::applyFilters( bool doBuildList )
{
foreach ( SkyObject *o, data->skyComposite()->comets() )
{
- if ( needRegion )
- filterPass = applyRegionFilter( o, doBuildList );
- if ( olw->SelectByDate->isChecked() && filterPass)
- applyObservableFilter( o, doBuildList );
+ if ( olw->SelectByMagnitude->isChecked() )
+ {
+ if ( o->mag() > 90. )
+ {
+ if ( olw->IncludeNoMag->isChecked() )
+ {
+ if ( needRegion )
+ filterPass = applyRegionFilter( o, doBuildList );
+ if ( olw->SelectByDate->isChecked() && filterPass)
+ applyObservableFilter( o, doBuildList );
+ }
+ else if ( ! doBuildList )
+ --ObjectCount;
+ }
+ else
+ {
+ if ( o->mag() <= maglimit )
+ {
+ if ( needRegion )
+ filterPass = applyRegionFilter( o, doBuildList );
+ if ( olw->SelectByDate->isChecked() && filterPass)
+ applyObservableFilter( o, doBuildList );
+ }
+ else if ( ! doBuildList )
+ --ObjectCount;
+ }
+ }
+ else
+ {
+ if ( needRegion )
+ filterPass = applyRegionFilter( o, doBuildList );
+ if ( olw->SelectByDate->isChecked() && filterPass)
+ applyObservableFilter( o, doBuildList );
+ }
}
}
@@ -706,20 +736,24 @@ void ObsListWizard::applyFilters( bool doBuildList )
if ( o->mag() > 90. )
{
if ( olw->IncludeNoMag->isChecked() )
+ {
if ( needRegion )
filterPass = applyRegionFilter( o, doBuildList );
if ( olw->SelectByDate->isChecked() && filterPass)
applyObservableFilter( o, doBuildList );
+ }
else if ( ! doBuildList )
--ObjectCount;
}
else
{
if ( o->mag() <= maglimit )
+ {
if ( needRegion )
filterPass = applyRegionFilter( o, doBuildList );
if ( olw->SelectByDate->isChecked() && filterPass)
applyObservableFilter( o, doBuildList );
+ }
else if ( ! doBuildList )
--ObjectCount;
}