Commit 6a5a54de authored by Jasem Mutlaq's avatar Jasem Mutlaq

REVIEW:113520

parent e41853e8
......@@ -639,16 +639,16 @@ void SkyMap::zoomOutOrMagStep( const int modifier ) {
}
double SkyMap::magFactor( const int modifier ) {
double factor = ( modifier & Qt::ControlModifier) ? 0.2 : 1.0;
if ( modifier & Qt::ShiftModifier )
factor /= 2.0;
double factor = ( modifier & Qt::ControlModifier) ? 0.1 : 0.5;
if ( modifier & Qt::ShiftModifier )
factor *= 2.0;
return factor;
}
void SkyMap::incMagLimit( const int modifier ) {
double limit = 2.222 * log10(static_cast<double>( Options::starDensity() )) + 0.35;
limit += magFactor( modifier );
if ( limit > 7.94 ) limit = 7.94;
if ( limit > 5.75954 ) limit = 5.75954;
Options::setStarDensity( pow( 10, ( limit - 0.35 ) / 2.222) );
//printf("maglim set to %3.1f\n", limit);
forceUpdate();
......@@ -657,7 +657,7 @@ void SkyMap::incMagLimit( const int modifier ) {
void SkyMap::decMagLimit( const int modifier ) {
double limit = 2.222 * log10(static_cast<double>( Options::starDensity() )) + 0.35;
limit -= magFactor( modifier );
if ( limit < 3.55 ) limit = 3.55;
if ( limit < 1.18778 ) limit = 1.18778;
Options::setStarDensity( pow( 10, ( limit - 0.35 ) / 2.222) );
//printf("maglim set to %3.1f\n", limit);
forceUpdate();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment