From 8d2ac2069901a079205185d1d5650fb28e13adf2 Mon Sep 17 00:00:00 2001 From: aquiles Date: Sun, 7 Nov 2010 19:33:26 +0100 Subject: [PATCH] Changed: #1171 OVQT weather & sun color dock window --- .../tools/3d/object_viewer_qt/src/global_wind_dialog.cpp | 6 +++--- code/nel/tools/3d/object_viewer_qt/src/object_viewer.cpp | 2 +- code/nel/tools/3d/object_viewer_qt/src/sun_color_dialog.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/global_wind_dialog.cpp b/code/nel/tools/3d/object_viewer_qt/src/global_wind_dialog.cpp index 764aa6329..844af65ab 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/global_wind_dialog.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/global_wind_dialog.cpp @@ -30,9 +30,9 @@ CGlobalWindDialog::CGlobalWindDialog(QWidget *parent) : QDockWidget(parent) { _ui.setupUi(this); - + //_ui.directionWidget->setWrapper(&_DirectionWrapper); - + connect(_ui.horizontalSlider, SIGNAL(valueChanged(int)), this, SLOT(setWndPower(int))); connect(this, SIGNAL(visibilityChanged(bool)), this, SLOT(updateWnd(bool))); } @@ -50,7 +50,7 @@ void CGlobalWindDialog::setWndPower(int value) void CGlobalWindDialog::updateWnd(bool visible) { - if (!visible) + if (!visible || !Modules::objView().getScene()) return; _ui.horizontalSlider->setValue(int(Modules::objView().getScene()->getGlobalWindPower() * _ui.horizontalSlider->maximum())); diff --git a/code/nel/tools/3d/object_viewer_qt/src/object_viewer.cpp b/code/nel/tools/3d/object_viewer_qt/src/object_viewer.cpp index db410ed43..cfd0022eb 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/object_viewer.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/object_viewer.cpp @@ -57,7 +57,7 @@ CObjectViewer::CObjectViewer() _phi(0), _psi(0),_dist(20), _CameraFocal(75), _CurrentInstance(""), - _BloomEffect(false) + _BloomEffect(false), _Scene(0) { } diff --git a/code/nel/tools/3d/object_viewer_qt/src/sun_color_dialog.cpp b/code/nel/tools/3d/object_viewer_qt/src/sun_color_dialog.cpp index c3637191e..bb189167b 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/sun_color_dialog.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/sun_color_dialog.cpp @@ -45,7 +45,7 @@ CSunColorDialog::~CSunColorDialog() void CSunColorDialog::updateSunColor(bool visible) { - if (!visible) + if (!visible || !Modules::objView().getScene()) return; _ui.ambientWidget->setColor(Modules::objView().getScene()->getSunAmbient());