diff --git a/Basic_viewer/include/CGAL/Graphics_scene.h b/Basic_viewer/include/CGAL/Graphics_scene.h index 1d1def2810b..73a5fafe637 100644 --- a/Basic_viewer/include/CGAL/Graphics_scene.h +++ b/Basic_viewer/include/CGAL/Graphics_scene.h @@ -14,7 +14,6 @@ #define CGAL_GRAPHICS_SCENE_H // TODO #include -#include #include #include @@ -270,18 +269,15 @@ public: } template - void add_text(const KPoint &kp, const QString &txt) + void add_text(const KPoint &kp, const std::string &txt) { Local_point p = get_local_point(kp); m_texts.push_back(std::make_tuple(p, txt)); } - template void add_text(const KPoint &kp, const char *txt) - { add_text(kp, QString(txt)); } - template - void add_text(const KPoint &kp, const std::string &txt) - { add_text(kp, txt.c_str()); } + void add_text(const KPoint &kp, const char *txt) + { add_text(kp, std::string(txt)); } bool empty() const { @@ -381,7 +377,7 @@ public: int m_texts_size() const { return m_texts.size(); } - const std::vector>& get_m_texts() const + const std::vector>& get_m_texts() const { return m_texts; } public: @@ -428,7 +424,7 @@ protected: Buffer_for_vao m_buffer_for_mono_faces; Buffer_for_vao m_buffer_for_colored_faces; - std::vector> m_texts; + std::vector> m_texts; std::vector arrays[LAST_INDEX]; diff --git a/Basic_viewer/include/CGAL/Qt/Basic_viewer.h b/Basic_viewer/include/CGAL/Qt/Basic_viewer.h index 245b335eb3e..81325a2fa25 100644 --- a/Basic_viewer/include/CGAL/Qt/Basic_viewer.h +++ b/Basic_viewer/include/CGAL/Qt/Basic_viewer.h @@ -598,7 +598,8 @@ public: std::get<0>(m_texts_vec[i]).y(), std::get<0>(m_texts_vec[i]).z())); - drawText((int)screenPos[0], (int)screenPos[1], std::get<1>(m_texts_vec[i])); + drawText((int)screenPos[0], (int)screenPos[1], + QString(std::get<1>(m_texts_vec[i]).c_str())); } glEnable(GL_LIGHTING); }