Fixed the dreaded infinite loop bug. Implemented a few methods for SoZoomTranslate to ensure that it works correctly in all cases.

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5036 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
mrlukeparry
2011-10-18 21:55:29 +00:00
parent 6af7745439
commit 601bd29b2d
4 changed files with 16 additions and 7 deletions

View File

@@ -82,11 +82,8 @@ SoZoomTranslation::SoZoomTranslation()
}
void SoZoomTranslation::GLRender(SoGLRenderAction * action)
{
SoState *state = action->getState();
const SbViewVolume & vv = SoViewVolumeElement::get(state);
this->doAction((SoAction *)action);
{
SoZoomTranslation::doAction((SoAction *)action);
}
// Doc in superclass.
@@ -135,6 +132,16 @@ void SoZoomTranslation::getMatrix(SoGetMatrixAction * action)
}
void SoZoomTranslation::callback(SoCallbackAction * action)
{
SoZoomTranslation::doAction((SoAction *)action);
}
void SoZoomTranslation::getBoundingBox(SoGetBoundingBoxAction * action)
{
SoZoomTranslation::doAction((SoAction *)action);
}
void SoZoomTranslation::pick(SoPickAction * action)
{
SoZoomTranslation::doAction((SoAction *)action);

View File

@@ -46,6 +46,8 @@ protected:
virtual void getPrimitiveCount(SoGetPrimitiveCountAction * action);
virtual void getMatrix(SoGetMatrixAction * action);
virtual void GLRender(SoGLRenderAction *action);
virtual void getBoundingBox(SoGetBoundingBoxAction * action);
virtual void callback(SoCallbackAction * action);
virtual void pick(SoPickAction * action);
private:

View File

@@ -991,7 +991,7 @@ bool ViewProviderSketch::isConstraintAtPosition(const Base::Vector3d &constrPos,
}
Base::Vector3d ViewProviderSketch::seekConstraintPosition(const Base::Vector3d &suggestedPos,
const Base::Vector3d &dir, int step,
const Base::Vector3d &dir, float step,
const SoNode *constraint)
{
int multiplier = 0;

View File

@@ -141,7 +141,7 @@ public:
bool isConstraintAtPosition(const Base::Vector3d &constrPos, const SoNode *constraint);
/// finds a free position for placing a constraint icon
Base::Vector3d seekConstraintPosition(const Base::Vector3d &suggestedPos,
const Base::Vector3d &dir, int step,
const Base::Vector3d &dir, float step,
const SoNode *constraint);
float getScaleFactor();