From cfa89e9da4649e2285e9006071aca0b483e41c2d Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 29 Sep 2020 15:51:16 +0200 Subject: [PATCH 1/2] Replace < by O to have it on all keyboards, not only french ones --- GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h index 50d23eb96de..20dcc461798 100644 --- a/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h +++ b/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h @@ -1239,7 +1239,7 @@ protected: setKeyDescription(::Qt::Key_Minus+::Qt::ControlModifier, "Decrease size of vertices"); setKeyDescription(::Qt::Key_PageDown, "Increase light (all colors, use shift/alt/ctrl for one rgb component)"); setKeyDescription(::Qt::Key_PageUp, "Decrease light (all colors, use shift/alt/ctrl for one rgb component)"); - setKeyDescription(::Qt::Key_Less, "Toggles 2D mode only"); + setKeyDescription(::Qt::Key_O, "Toggles 2D mode only"); // Light default parameters glLineWidth(m_size_edges); @@ -1448,7 +1448,7 @@ protected: arg(m_ambient_color.x()).arg(m_ambient_color.y()).arg(m_ambient_color.z())); update(); } - else if ((e->key()==::Qt::Key_Less) && (modifiers==::Qt::NoButton)) + else if ((e->key()==::Qt::Key_O) && (modifiers==::Qt::NoButton)) { bool old_2D=is_two_dimensional(); m_no_2D_mode=!m_no_2D_mode; From 9503a6a18b43eae5e50ee8f3598abe196a9947fa Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 29 Sep 2020 16:06:35 +0200 Subject: [PATCH 2/2] Remove state of camera. It is supposed to be reinit when launching the app and sometimes it leads to not being to visualize anything --- GraphicsView/include/CGAL/Qt/qglviewer_impl.h | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h index b097030d1ea..2aee859c811 100644 --- a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h +++ b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h @@ -3840,18 +3840,13 @@ void CGAL::QGLViewer::initFromDOMElement(const QDomElement &element) { setAxisIsDrawn(DomUtils::boolFromDom(child, "axisIsDrawn", false)); setGridIsDrawn(DomUtils::boolFromDom(child, "gridIsDrawn", false)); setFPSIsDisplayed(DomUtils::boolFromDom(child, "FPSIsDisplayed", false)); - // See comment below. - tmpCameraIsEdited = DomUtils::boolFromDom(child, "cameraIsEdited", false); - // setTextIsEnabled(DomUtils::boolFromDom(child, "textIsEnabled", true)); } if (child.tagName() == "Geometry") { setFullScreen(DomUtils::boolFromDom(child, "fullScreen", false)); - if (isFullScreen()) { - prevPos_.setX(DomUtils::intFromDom(child, "prevPosX", 0)); - prevPos_.setY(DomUtils::intFromDom(child, "prevPosY", 0)); - } else { + if (!isFullScreen()) + { int width = DomUtils::intFromDom(child, "width", 600); int height = DomUtils::intFromDom(child, "height", 400); topLevelWidget()->resize(width, height); @@ -3864,15 +3859,6 @@ void CGAL::QGLViewer::initFromDOMElement(const QDomElement &element) { } } - if (child.tagName() == "Camera") { - connectAllCameraKFIInterpolatedSignals(false); - camera()->initFromDOMElement(child); - connectAllCameraKFIInterpolatedSignals(); - } - - if ((child.tagName() == "ManipulatedFrame") && (manipulatedFrame())) - manipulatedFrame()->initFromDOMElement(child); - child = child.nextSibling().toElement(); }