StelScriptMgr.cpp   StelScriptMgr.cpp 
skipping to change at line 30 skipping to change at line 30
#include "StelScriptMgr.hpp" #include "StelScriptMgr.hpp"
#include "StelMainScriptAPI.hpp" #include "StelMainScriptAPI.hpp"
#include "ScreenImageMgr.hpp" #include "ScreenImageMgr.hpp"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "StelMovementMgr.hpp" #include "StelMovementMgr.hpp"
#include "StelNavigator.hpp"
#include "StelSkyDrawer.hpp" #include "StelSkyDrawer.hpp"
#include "StelSkyLayerMgr.hpp" #include "StelSkyLayerMgr.hpp"
#include <QAction> #include <QAction>
#include <QDateTime> #include <QDateTime>
#include <QDebug> #include <QDebug>
#include <QDir> #include <QDir>
#include <QFile> #include <QFile>
#include <QFileInfo> #include <QFileInfo>
#include <QRegExp> #include <QRegExp>
skipping to change at line 386 skipping to change at line 386
{ {
engine.globalObject().setProperty("scriptRateReadOnly", r); engine.globalObject().setProperty("scriptRateReadOnly", r);
return; return;
} }
float currentScriptRate = engine.globalObject().property("scriptRate ReadOnly").toNumber(); float currentScriptRate = engine.globalObject().property("scriptRate ReadOnly").toNumber();
// pre-calculate the new time rate in an effort to prevent there bei ng much latency // pre-calculate the new time rate in an effort to prevent there bei ng much latency
// between setting the script rate and the time rate. // between setting the script rate and the time rate.
float factor = r / currentScriptRate; float factor = r / currentScriptRate;
StelNavigator* nav = StelApp::getInstance().getCore()->getNavigator(
);
nav->setTimeRate(nav->getTimeRate() * factor);
GETSTELMODULE(StelMovementMgr)->setMovementSpeedFactor(nav->getTimeR StelCore* core = StelApp::getInstance().getCore();
ate()); core->setTimeRate(core->getTimeRate() * factor);
GETSTELMODULE(StelMovementMgr)->setMovementSpeedFactor(core->getTime
Rate());
engine.globalObject().setProperty("scriptRateReadOnly", r); engine.globalObject().setProperty("scriptRateReadOnly", r);
} }
double StelScriptMgr::getScriptRate() double StelScriptMgr::getScriptRate()
{ {
return engine.globalObject().property("scriptRateReadOnly").toNumber (); return engine.globalObject().property("scriptRateReadOnly").toNumber ();
} }
void StelScriptMgr::debug(const QString& msg) void StelScriptMgr::debug(const QString& msg)
{ {
 End of changes. 3 change blocks. 
6 lines changed or deleted 6 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/