Changed: #1171 OVQT weather & sun color dock window

hg/feature/sound
aquiles 14 years ago
parent addb6b4e95
commit 44f61912ae

@ -30,9 +30,9 @@ CGlobalWindDialog::CGlobalWindDialog(QWidget *parent)
: QDockWidget(parent) : QDockWidget(parent)
{ {
_ui.setupUi(this); _ui.setupUi(this);
//_ui.directionWidget->setWrapper(&_DirectionWrapper); //_ui.directionWidget->setWrapper(&_DirectionWrapper);
connect(_ui.horizontalSlider, SIGNAL(valueChanged(int)), this, SLOT(setWndPower(int))); connect(_ui.horizontalSlider, SIGNAL(valueChanged(int)), this, SLOT(setWndPower(int)));
connect(this, SIGNAL(visibilityChanged(bool)), this, SLOT(updateWnd(bool))); connect(this, SIGNAL(visibilityChanged(bool)), this, SLOT(updateWnd(bool)));
} }
@ -50,7 +50,7 @@ void CGlobalWindDialog::setWndPower(int value)
void CGlobalWindDialog::updateWnd(bool visible) void CGlobalWindDialog::updateWnd(bool visible)
{ {
if (!visible) if (!visible || !Modules::objView().getScene())
return; return;
_ui.horizontalSlider->setValue(int(Modules::objView().getScene()->getGlobalWindPower() * _ui.horizontalSlider->maximum())); _ui.horizontalSlider->setValue(int(Modules::objView().getScene()->getGlobalWindPower() * _ui.horizontalSlider->maximum()));

@ -57,7 +57,7 @@ CObjectViewer::CObjectViewer()
_phi(0), _psi(0),_dist(20), _phi(0), _psi(0),_dist(20),
_CameraFocal(75), _CameraFocal(75),
_CurrentInstance(""), _CurrentInstance(""),
_BloomEffect(false) _BloomEffect(false), _Scene(0)
{ {
} }

@ -45,7 +45,7 @@ CSunColorDialog::~CSunColorDialog()
void CSunColorDialog::updateSunColor(bool visible) void CSunColorDialog::updateSunColor(bool visible)
{ {
if (!visible) if (!visible || !Modules::objView().getScene())
return; return;
_ui.ambientWidget->setColor(Modules::objView().getScene()->getSunAmbient()); _ui.ambientWidget->setColor(Modules::objView().getScene()->getSunAmbient());

Loading…
Cancel
Save