diff --git a/src/Gui/Quarter/QuarterWidget.cpp b/src/Gui/Quarter/QuarterWidget.cpp index 3560d595de..b69b87ca5d 100644 --- a/src/Gui/Quarter/QuarterWidget.cpp +++ b/src/Gui/Quarter/QuarterWidget.cpp @@ -76,9 +76,7 @@ #include #include -#if COIN_MAJOR_VERSION >= 4 #include -#endif #include #include @@ -1245,11 +1243,7 @@ QuarterWidget::setNavigationModeFile(const QUrl & url) QFile file(filenametmp); if (file.open(QIODevice::ReadOnly)){ QByteArray fileContents = file.readAll(); -#if COIN_MAJOR_VERSION >= 4 stateMachine = ScXML::readBuffer(SbByteBuffer(fileContents.size(), fileContents.constData())); -#else - stateMachine = ScXML::readBuffer(fileContents.constData()); -#endif file.close(); } } diff --git a/src/Gui/SoTextLabel.cpp b/src/Gui/SoTextLabel.cpp index 6e533bea98..695ba378e3 100644 --- a/src/Gui/SoTextLabel.cpp +++ b/src/Gui/SoTextLabel.cpp @@ -51,12 +51,7 @@ #include #include #include - -#if COIN_MAJOR_VERSION > 3 #include -#else -#include -#endif #include "SoTextLabel.h" #include "SoFCInteractiveElement.h" @@ -65,31 +60,6 @@ using namespace Gui; -/*! -\code - -s=""" - #Inventor V2.1 ascii - - Annotation { - Translation { translation 4 0 0 } - FontStyle { - size 20 - style BOLD - } - BaseColor { - rgb 0.0 0.0 0.0 - } - - - SoTextLabel { string ["Text label", "Second line"] backgroundColor 1.0 0.447059 0.337255} - } -""" - -App.ActiveDocument.addObject("App::InventorObject","iv").Buffer=s - -\endcode -*/ SO_NODE_SOURCE(SoTextLabel) @@ -215,11 +185,7 @@ void SoTextLabel::GLRender(SoGLRenderAction *action) // disable textures for all units SoGLTextureEnabledElement::set(state, this, false); -#if COIN_MAJOR_VERSION > 3 SoMultiTextureEnabledElement::set(state, this, false); -#else - SoGLTexture3EnabledElement::set(state, this, false); -#endif glPushAttrib(GL_ENABLE_BIT | GL_PIXEL_MODE_BIT | GL_COLOR_BUFFER_BIT); glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT); diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index 3103b1afde..f8c3e5df70 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -1707,16 +1707,11 @@ void View3DInventorViewer::savePicture(int width, int height, int sample, const auto root = new SoSeparator; root->ref(); -#if (COIN_MAJOR_VERSION >= 4) - // The behaviour in Coin4 has changed so that when using the same instance of 'SoFCOffscreenRenderer' - // multiple times internally the biggest viewport size is stored and set to the SoGLRenderAction. - // The trick is to add a callback node and override the viewport size with what we want. if (useCoinOffscreenRenderer) { auto cbvp = new SoCallback; cbvp->setCallback(setViewportCB); root->addChild(cbvp); } -#endif SoCamera* camera = getSoRenderManager()->getCamera(); @@ -3524,7 +3519,6 @@ void View3DInventorViewer::viewSelection() float(bbox.MaxX), float(bbox.MaxY), float(bbox.MaxZ)); -#if (COIN_MAJOR_VERSION >= 4) float aspectratio = getSoRenderManager()->getViewportRegion().getViewportAspectRatio(); switch (cam->viewportMapping.getValue()) { case SoCamera::CROP_VIEWPORT_FILL_FRAME: @@ -3536,27 +3530,6 @@ void View3DInventorViewer::viewSelection() break; } cam->viewBoundingBox(box,aspectratio,1.0); -#else - SoTempPath path(2); - path.ref(); - auto pcGroup = new SoGroup; - pcGroup->ref(); - auto pcTransform = new SoTransform; - pcGroup->addChild(pcTransform); - pcTransform->translation = box.getCenter(); - auto *pcCube = new SoCube; - pcGroup->addChild(pcCube); - float sizeX,sizeY,sizeZ; - box.getSize(sizeX,sizeY,sizeZ); - pcCube->width = sizeX; - pcCube->height = sizeY; - pcCube->depth = sizeZ; - path.append(pcGroup); - path.append(pcCube); - cam->viewAll(&path,getSoRenderManager()->getViewportRegion()); - path.unrefNoDelete(); - pcGroup->unref(); -#endif } } diff --git a/src/Gui/ViewProviderAnnotation.cpp b/src/Gui/ViewProviderAnnotation.cpp index c1cb67e3ce..785a96f368 100644 --- a/src/Gui/ViewProviderAnnotation.cpp +++ b/src/Gui/ViewProviderAnnotation.cpp @@ -248,15 +248,8 @@ void ViewProviderAnnotation::updateData(const App::Property* prop) const char* cs = line.c_str(); if (line.empty()) cs = " "; // empty lines make coin crash, we use a space instead -#if (COIN_MAJOR_VERSION <= 3) - QByteArray latin1str; - latin1str = (QString::fromUtf8(cs)).toLatin1(); - pLabel->string.set1Value(index, SbString(latin1str.constData())); - pLabel3d->string.set1Value(index, SbString(latin1str.constData())); -#else pLabel->string.set1Value(index, SbString(cs)); pLabel3d->string.set1Value(index, SbString(cs)); -#endif index++; } } diff --git a/src/Mod/Sandbox/Gui/GLGraphicsView.cpp b/src/Mod/Sandbox/Gui/GLGraphicsView.cpp index 544762e22b..316dc31aa0 100644 --- a/src/Mod/Sandbox/Gui/GLGraphicsView.cpp +++ b/src/Mod/Sandbox/Gui/GLGraphicsView.cpp @@ -454,11 +454,7 @@ GraphicsScene::setNavigationModeFile(const QUrl & url) QFile file(QString::fromLatin1(filenametmp)); if (file.open(QIODevice::ReadOnly)) { QByteArray fileContents = file.readAll(); -#if COIN_MAJOR_VERSION >= 4 stateMachine = ScXML::readBuffer(SbByteBuffer(fileContents.size(), fileContents.constData())); -#else - stateMachine = ScXML::readBuffer(fileContents.constData()); -#endif file.close(); } }