From cb420672630eeef35a94690f34d95e957093b0bd Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Fri, 18 Apr 2025 11:16:28 +0200 Subject: [PATCH] update draw voronoi 2 --- Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h b/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h index a49594feecc..356f32de3c9 100644 --- a/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h +++ b/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h @@ -371,8 +371,6 @@ void add_to_graphics_scene(const CGAL_VORONOI_TYPE& v2, add_to_graphics_scene(v2, graphics_scene, gs_options); } -#if defined(CGAL_USE_BASIC_VIEWER_QT) - // Specialization of draw function. template void draw(const CGAL_VORONOI_TYPE& av2, @@ -382,6 +380,10 @@ void draw(const CGAL_VORONOI_TYPE& av2, CGAL::Graphics_scene buffer; add_to_graphics_scene(av2, buffer, gs_options); + CGAL_USE(title); + +#if defined(CGAL_USE_BASIC_VIEWER_QT) + CGAL::Qt::QApplication_and_basic_viewer app(buffer, title); if(app) { @@ -435,6 +437,7 @@ void draw(const CGAL_VORONOI_TYPE& av2, // Then we run the app app.run(); } +#endif // CGAL_USE_BASIC_VIEWER_QT } template @@ -449,8 +452,6 @@ void draw(const CGAL_VORONOI_TYPE& av2, draw(av2, gs_options, title); } -#endif // CGAL_USE_BASIC_VIEWER_QT - #undef CGAL_VORONOI_TYPE } // End namespace CGAL