Fixed issue with some checkbox settings not getting saved properly (eg cloud shadows).
parent
0c6b073266
commit
9774ae1d8b
|
@ -18,34 +18,48 @@
|
|||
|
||||
#import "CelestiaController.h"
|
||||
#include "celestiacore.h"
|
||||
#include "render.h"
|
||||
#include "qtcapture.h"
|
||||
#import <Carbon/Carbon.h>
|
||||
|
||||
class MacSettingsWatcher : public CelestiaWatcher
|
||||
class MacSettingsWatcher : public CelestiaWatcher, public RendererWatcher
|
||||
{
|
||||
private:
|
||||
CelestiaSettings *settings;
|
||||
CelestiaCore *appCore;
|
||||
|
||||
public:
|
||||
MacSettingsWatcher(CelestiaAppCore *_appCore,
|
||||
CelestiaSettings* _settings) :
|
||||
CelestiaWatcher(*[_appCore appCore]), settings(_settings)
|
||||
{};
|
||||
CelestiaWatcher(*[_appCore appCore]), settings(_settings), appCore([_appCore appCore])
|
||||
{
|
||||
appCore->getRenderer()->addWatcher(this);
|
||||
};
|
||||
|
||||
virtual ~MacSettingsWatcher()
|
||||
{
|
||||
appCore->getRenderer()->removeWatcher(this);
|
||||
};
|
||||
|
||||
void notifyChange(CelestiaCore *, int flags)
|
||||
{
|
||||
if ( 0 != (flags & (
|
||||
CelestiaCore::LabelFlagsChanged
|
||||
| CelestiaCore::RenderFlagsChanged
|
||||
| CelestiaCore::VerbosityLevelChanged
|
||||
// CelestiaCore::LabelFlagsChanged
|
||||
// | CelestiaCore::RenderFlagsChanged
|
||||
CelestiaCore::VerbosityLevelChanged
|
||||
| CelestiaCore::TimeZoneChanged
|
||||
| CelestiaCore::AmbientLightChanged
|
||||
// | CelestiaCore::AmbientLightChanged
|
||||
| CelestiaCore::FaintestChanged
|
||||
)) )
|
||||
{
|
||||
[settings validateItems];
|
||||
}
|
||||
};
|
||||
|
||||
virtual void notifyRenderSettingsChanged(const Renderer *renderer)
|
||||
{
|
||||
[settings validateItems];
|
||||
};
|
||||
};
|
||||
|
||||
class MacOSXAlerter : public CelestiaCore::Alerter
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
88654A240DB29585007C8027 /* celx_position.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 88654A110DB29585007C8027 /* celx_position.cpp */; };
|
||||
88654A260DB29585007C8027 /* celx_rotation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 88654A130DB29585007C8027 /* celx_rotation.cpp */; };
|
||||
88654A280DB29585007C8027 /* celx_vector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 88654A150DB29585007C8027 /* celx_vector.cpp */; };
|
||||
88BC568D0E32D056006A7AF6 /* particlesystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 88BC568B0E32D056006A7AF6 /* particlesystem.cpp */; };
|
||||
E50CCA390C065BF900E9C76A /* eclipsefinder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E50CCA370C065BF900E9C76A /* eclipsefinder.cpp */; };
|
||||
E50CCA590C065F0100E9C76A /* EclipseFinder.nib in Resources */ = {isa = PBXBuildFile; fileRef = E50CCA530C065F0100E9C76A /* EclipseFinder.nib */; };
|
||||
E50CCA6A0C06632A00E9C76A /* EclipseFinderController.mm in Sources */ = {isa = PBXBuildFile; fileRef = E50CCA680C06632A00E9C76A /* EclipseFinderController.mm */; };
|
||||
|
@ -541,8 +540,6 @@
|
|||
88654A140DB29585007C8027 /* celx_rotation.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = celx_rotation.h; path = ../src/celestia/celx_rotation.h; sourceTree = SOURCE_ROOT; };
|
||||
88654A150DB29585007C8027 /* celx_vector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = celx_vector.cpp; path = ../src/celestia/celx_vector.cpp; sourceTree = SOURCE_ROOT; };
|
||||
88654A160DB29585007C8027 /* celx_vector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = celx_vector.h; path = ../src/celestia/celx_vector.h; sourceTree = SOURCE_ROOT; };
|
||||
88BC568B0E32D056006A7AF6 /* particlesystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = particlesystem.cpp; path = ../src/celengine/particlesystem.cpp; sourceTree = SOURCE_ROOT; };
|
||||
88BC568C0E32D056006A7AF6 /* particlesystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = particlesystem.h; path = ../src/celengine/particlesystem.h; sourceTree = SOURCE_ROOT; };
|
||||
E50657D70CBFB08500151204 /* imagecapture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imagecapture.h; path = ../src/celestia/imagecapture.h; sourceTree = SOURCE_ROOT; };
|
||||
E50CCA370C065BF900E9C76A /* eclipsefinder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = eclipsefinder.cpp; path = ../src/celestia/eclipsefinder.cpp; sourceTree = SOURCE_ROOT; };
|
||||
E50CCA380C065BF900E9C76A /* eclipsefinder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = eclipsefinder.h; path = ../src/celestia/eclipsefinder.h; sourceTree = SOURCE_ROOT; };
|
||||
|
@ -1450,8 +1447,6 @@
|
|||
F51C6D52029596B4014901DC /* celengine */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
88BC568B0E32D056006A7AF6 /* particlesystem.cpp */,
|
||||
88BC568C0E32D056006A7AF6 /* particlesystem.h */,
|
||||
881336D60DEF5EE0001F3BC5 /* skygrid.cpp */,
|
||||
881336D70DEF5EE0001F3BC5 /* skygrid.h */,
|
||||
886544270DAC3CC4007C8027 /* visibleregion.cpp */,
|
||||
|
@ -1794,7 +1789,6 @@
|
|||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = E532F41D0933316100D7D5B3 /* Build configuration list for PBXProject "celestia" */;
|
||||
compatibilityVersion = "Xcode 2.4";
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
English,
|
||||
|
@ -2035,7 +2029,6 @@
|
|||
88654A260DB29585007C8027 /* celx_rotation.cpp in Sources */,
|
||||
88654A280DB29585007C8027 /* celx_vector.cpp in Sources */,
|
||||
881336D80DEF5EE0001F3BC5 /* skygrid.cpp in Sources */,
|
||||
88BC568D0E32D056006A7AF6 /* particlesystem.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue