Merge pull request #5036 from maxGimeno/Basic_viewer-fixes-maxGimeno

Basic_viewer: Minor fixes
This commit is contained in:
Sebastien Loriot 2020-10-02 15:11:50 +02:00 committed by GitHub
commit 7461cd7c70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 18 deletions

View File

@ -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;

View File

@ -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();
}