Gui: rename methods setBacklight() & isBacklight() to harmonize with setHeadlightEnabled() & isHeadlightEnabled()
This commit is contained in:
@@ -194,7 +194,7 @@ void DlgSettingsLightSources::loadDirection()
|
||||
void DlgSettingsLightSources::toggleLight(bool on)
|
||||
{
|
||||
if (view) {
|
||||
view->getHeadlight()->on = on;
|
||||
view->setHeadlightEnabled(on);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1407,12 +1407,12 @@ SoDirectionalLight* View3DInventorViewer::getBacklight() const
|
||||
return this->backlight;
|
||||
}
|
||||
|
||||
void View3DInventorViewer::setBacklight(SbBool on)
|
||||
void View3DInventorViewer::setBacklightEnabled(bool on)
|
||||
{
|
||||
this->backlight->on = on;
|
||||
}
|
||||
|
||||
SbBool View3DInventorViewer::isBacklight() const
|
||||
bool View3DInventorViewer::isBacklightEnabled() const
|
||||
{
|
||||
return this->backlight->on.getValue();
|
||||
}
|
||||
|
||||
@@ -153,8 +153,8 @@ public:
|
||||
void onSelectionChanged(const SelectionChanges &Reason) override;
|
||||
|
||||
SoDirectionalLight* getBacklight() const;
|
||||
void setBacklight(SbBool on);
|
||||
SbBool isBacklight() const;
|
||||
void setBacklightEnabled(bool on);
|
||||
bool isBacklightEnabled() const;
|
||||
void setSceneGraph (SoNode *root) override;
|
||||
SbBool searchNode(SoNode*) const;
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ void View3DSettings::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::M
|
||||
if (strcmp(Reason,"EnableHeadlight") == 0) {
|
||||
bool enable = rGrp.GetBool("EnableHeadlight", true);
|
||||
for (auto _viewer : _viewers) {
|
||||
_viewer->getHeadlight()->on.setValue(enable);
|
||||
_viewer->setHeadlightEnabled(enable);
|
||||
}
|
||||
}
|
||||
else if (strcmp(Reason,"HeadlightColor") == 0) {
|
||||
@@ -144,7 +144,7 @@ void View3DSettings::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::M
|
||||
}
|
||||
else if (strcmp(Reason,"EnableBacklight") == 0) {
|
||||
for (auto _viewer : _viewers) {
|
||||
_viewer->setBacklight(rGrp.GetBool("EnableBacklight", false));
|
||||
_viewer->setBacklightEnabled(rGrp.GetBool("EnableBacklight", false));
|
||||
}
|
||||
}
|
||||
else if (strcmp(Reason,"BacklightColor") == 0) {
|
||||
|
||||
Reference in New Issue
Block a user