Gui: const correctness in ViewProviderPlane
This commit is contained in:
@@ -152,7 +152,7 @@ void ViewProviderPlane::setLabelVisibility(bool val)
|
||||
labelSwitch->whichChild = val ? SO_SWITCH_ALL : SO_SWITCH_NONE;
|
||||
}
|
||||
|
||||
unsigned long ViewProviderPlane::getColor(std::string& role)
|
||||
unsigned long ViewProviderPlane::getColor(const std::string& role) const
|
||||
{
|
||||
auto planesRoles = App::LocalCoordinateSystem::PlaneRoles;
|
||||
if (role == planesRoles[0]) {
|
||||
@@ -167,7 +167,7 @@ unsigned long ViewProviderPlane::getColor(std::string& role)
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string ViewProviderPlane::getLabelText(std::string& role)
|
||||
std::string ViewProviderPlane::getLabelText(const std::string& role) const
|
||||
{
|
||||
std::string text;
|
||||
auto planesRoles = App::LocalCoordinateSystem::PlaneRoles;
|
||||
@@ -183,7 +183,7 @@ std::string ViewProviderPlane::getLabelText(std::string& role)
|
||||
return text;
|
||||
}
|
||||
|
||||
std::string ViewProviderPlane::getRole()
|
||||
std::string ViewProviderPlane::getRole() const
|
||||
{
|
||||
// Note: Role property of App::Plane is not set yet when attaching.
|
||||
const char* name = pcObject->getNameInDocument();
|
||||
@@ -199,4 +199,4 @@ std::string ViewProviderPlane::getRole()
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,9 +43,9 @@ public:
|
||||
|
||||
void attach (App::DocumentObject*) override;
|
||||
|
||||
unsigned long getColor(std::string& role);
|
||||
std::string getRole();
|
||||
std::string getLabelText(std::string& role);
|
||||
unsigned long getColor(const std::string& role) const;
|
||||
std::string getRole() const;
|
||||
std::string getLabelText(const std::string& role) const;
|
||||
void setLabelVisibility(bool val);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user