diff --git a/interface/src/ui/overlays/Overlays.cpp b/interface/src/ui/overlays/Overlays.cpp index d208658e8b..029b0d90a1 100644 --- a/interface/src/ui/overlays/Overlays.cpp +++ b/interface/src/ui/overlays/Overlays.cpp @@ -358,7 +358,7 @@ bool Overlays::isLoaded(unsigned int id) { return overlay->isLoaded(); } -const float Overlays::textWidth(unsigned int id, const QString& text) { +float Overlays::textWidth(unsigned int id, const QString& text) const { Overlay* thisOverlay = _overlays2D[id]; if (thisOverlay) { if (typeid(*thisOverlay) == typeid(TextOverlay)) { diff --git a/interface/src/ui/overlays/Overlays.h b/interface/src/ui/overlays/Overlays.h index 4e11526f23..66232196f2 100644 --- a/interface/src/ui/overlays/Overlays.h +++ b/interface/src/ui/overlays/Overlays.h @@ -67,7 +67,7 @@ public slots: /// returns the width of the given text in the specified overlay if it is a text overlay: in pixels if it is a 2D text /// overlay; in meters if it is a 3D text overlay - const float textWidth(unsigned int id, const QString& text); + float textWidth(unsigned int id, const QString& text) const; private: QMap _overlays2D;