Gui: rename methods setBacklight() & isBacklight() to harmonize with setHeadlightEnabled() & isHeadlightEnabled()

This commit is contained in:
wmayer
2023-10-24 12:28:31 +02:00
committed by wwmayer
parent 29be14799f
commit e0d624bc66
4 changed files with 7 additions and 7 deletions

View File

@@ -194,7 +194,7 @@ void DlgSettingsLightSources::loadDirection()
void DlgSettingsLightSources::toggleLight(bool on)
{
if (view) {
view->getHeadlight()->on = on;
view->setHeadlightEnabled(on);
}
}

View File

@@ -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();
}

View File

@@ -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;

View File

@@ -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) {