+ fix author notes, fix memory leak, fix build failure under Windows

This commit is contained in:
wmayer 2014-07-30 10:04:03 +02:00
parent 6ca580456b
commit a252471625
7 changed files with 25 additions and 30 deletions

View File

@ -45,6 +45,7 @@
#include <Inventor/SbViewportRegion.h>
#include <Inventor/actions/SoBoxHighlightRenderAction.h>
#include <Inventor/actions/SoGetBoundingBoxAction.h>
#include <Inventor/actions/SoGetMatrixAction.h>
#include <Inventor/actions/SoGetPrimitiveCountAction.h>
#include <Inventor/actions/SoGLRenderAction.h>
#include <Inventor/actions/SoHandleEventAction.h>

View File

@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (c) 2002 J<EFBFBD>rgen Riegel <juergen.riegel@web.de> *
* Copyright (c) 2002 Juergen Riegel <juergen.riegel@web.de> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
@ -53,7 +53,7 @@ using namespace Gui::PropertyEditor;
/* TRANSLATOR Gui::PropertyView */
/*! Property Editor Widget
*
*
* Provides two Gui::PropertyEditor::PropertyEditor widgets, for "View" and "Data",
* in two tabs.
*/

View File

@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (c) 2004 J<EFBFBD>rgen Riegel <juergen.riegel@web.de> *
* Copyright (c) 2004 Juergen Riegel <juergen.riegel@web.de> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
@ -58,7 +58,7 @@ protected:
/** The 3D view window
* It consists out of the 3D view
* \author J<EFBFBD>rgen Riegel
* \author Juergen Riegel
*/
class GuiExport View3DInventor : public MDIView, public ParameterGrp::ObserverType
{

View File

@ -742,15 +742,14 @@ const std::vector<SbVec2s>& View3DInventorViewer::getPolygon(SbBool* clip_inner)
SbVec2f View3DInventorViewer::screenCoordsOfPath(SoPath *path) const
{
// Generate a matrix (well, a SoGetMatrixAction) that
// moves us us to the picked object's coordinate space.
SoGetMatrixAction *gma;
gma = new SoGetMatrixAction(getViewportRegion());
gma->apply(path);
// moves us to the picked object's coordinate space.
SoGetMatrixAction gma(getViewportRegion());
gma.apply(path);
// Use that matrix to translate the origin in the picked
// object's coordinate space into object space
SbVec3f imageCoords(0, 0, 0);
SbMatrix m = gma->getMatrix().transpose();
SbMatrix m = gma.getMatrix().transpose();
m.multMatrixVec(imageCoords, imageCoords);
// Now, project the object space coordinates of the object

View File

@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (c) 2004 J<EFBFBD>rgen Riegel <juergen.riegel@web.de> *
* Copyright (c) 2004 Juergen Riegel <juergen.riegel@web.de> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
@ -61,7 +61,7 @@ class SoFCUnifiedSelection;
class GLGraphicsItem;
class SoShapeScale;
/** GUI view into a 3-D Scene provided by View3DInventor
/** GUI view into a 3D scene provided by View3DInventor
*
*/
class GuiExport View3DInventorViewer : public SoQtViewer, public Gui::SelectionSingleton::ObserverType
@ -127,10 +127,6 @@ public:
SbBool isBacklight(void) const;
void setSceneGraph (SoNode *root);
// TODO: I think it might be cleaner to move this functionality into a
// different class, with this class supporting something like a
// rotate() slot that gets triggered by the new Animator class?
// IR 20140630
void setAnimationEnabled(const SbBool enable);
SbBool isAnimationEnabled(void) const;

View File

@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (c) 2009 J<EFBFBD>rgen Riegel <juergen.riegel@web.de> *
* Copyright (c) 2009 Juergen Riegel <juergen.riegel@web.de> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
@ -2038,7 +2038,6 @@ void ViewProviderSketch::clearCoinImage(SoImage *soImagePtr)
soImagePtr->setToDefaults();
}
QColor ViewProviderSketch::constrColor(int constraintId)
{
static QColor constrIcoColor((int)(ConstrIcoColor [0] * 255.0f),
@ -2058,7 +2057,7 @@ QColor ViewProviderSketch::constrColor(int constraintId)
else
return constrIcoColor;
}
int ViewProviderSketch::constrColorPriority(int constraintId)
{
if (edit->PreselectConstraintSet.count(constraintId))
@ -2116,7 +2115,7 @@ void ViewProviderSketch::drawConstraintIcons()
// Find the Constraint Icon SoImage Node
SoSeparator *sep = static_cast<SoSeparator *>(edit->constrGroup->getChild(constrId));
SbVec3f absPos;
// Somewhat hacky - we use SoZoomTranslations for most types of icon,
// but symmetry icons use SoTranslations...
@ -2125,7 +2124,7 @@ void ViewProviderSketch::drawConstraintIcons()
absPos = static_cast<SoZoomTranslation *>(translationPtr)->abPos.getValue();
else
absPos = translationPtr->translation.getValue();
SoImage *coinIconPtr = dynamic_cast<SoImage *>(sep->getChild(CONSTRAINT_SEPARATOR_INDEX_FIRST_ICON));
SoInfo *infoPtr = static_cast<SoInfo *>(sep->getChild(CONSTRAINT_SEPARATOR_INDEX_FIRST_CONSTRAINTID));
@ -2165,7 +2164,7 @@ void ViewProviderSketch::drawConstraintIcons()
iconQueue.push_back(thisIcon);
}
combineConstraintIcons(iconQueue);
}
@ -2297,7 +2296,7 @@ void ViewProviderSketch::drawMergedConstraintIcons(IconQueue iconQueue)
i = iconQueue.erase(i);
}
// To be inserted into edit->combinedConstBoxes
std::vector<QRect> boundingBoxesVec;
int oldHeight = 0;
@ -2390,7 +2389,7 @@ QImage ViewProviderSketch::renderConstrIcon(const QString &type,
QString joinStr = QString::fromAscii(", ");
QImage icon = Gui::BitmapFactory().pixmap(type.toAscii()).toImage();
QFont font = QApplication::font();
font.setPixelSize(11);
font.setBold(true);
@ -2432,7 +2431,7 @@ QImage ViewProviderSketch::renderConstrIcon(const QString &type,
++labelItr, ++colorItr) {
qp.setPen(*colorItr);
if(labelItr + 1 == labels.end()) // if this is the last label
labelStr = *labelItr;
else
@ -2450,7 +2449,7 @@ QImage ViewProviderSketch::renderConstrIcon(const QString &type,
icon.height() - qfm.height() + pxBelowBase);
boundingBoxes->push_back(labelBB);
}
cursorOffset += qfm.width(labelStr);
}
}
@ -3336,15 +3335,15 @@ void ViewProviderSketch::rebuildConstraintsVisual(void)
// #define CONSTRAINT_SEPARATOR_INDEX_MATERIAL_OR_DATUMLABEL 0
sep->addChild(mat);
// #define CONSTRAINT_SEPARATOR_INDEX_FIRST_TRANSLATION 1
sep->addChild(new SoZoomTranslation());
sep->addChild(new SoZoomTranslation());
// #define CONSTRAINT_SEPARATOR_INDEX_FIRST_ICON 2
sep->addChild(new SoImage());
sep->addChild(new SoImage());
// #define CONSTRAINT_SEPARATOR_INDEX_FIRST_CONSTRAINTID 3
sep->addChild(new SoInfo());
// #define CONSTRAINT_SEPARATOR_INDEX_SECOND_TRANSLATION 4
sep->addChild(new SoZoomTranslation());
sep->addChild(new SoZoomTranslation());
// #define CONSTRAINT_SEPARATOR_INDEX_SECOND_ICON 5
sep->addChild(new SoImage());
sep->addChild(new SoImage());
// #define CONSTRAINT_SEPARATOR_INDEX_SECOND_CONSTRAINTID 6
sep->addChild(new SoInfo());

View File

@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (c) 2009 J<EFBFBD>rgen Riegel <juergen.riegel@web.de> *
* Copyright (c) 2009 Juergen Riegel <juergen.riegel@web.de> *
* *
* This file is part of the FreeCAD CAx development system. *
* *