mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0030291: Visualization - manipulator crashes when is attached with scaling mode disabled
- in ComputeSelection() method checks are added to avoid taking triangulation of manipulator parts that are not computed
This commit is contained in:
@@ -271,6 +271,18 @@ void AIS_Manipulator::SetPart (const Standard_Integer theAxisIndex, const AIS_Ma
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetPart
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void AIS_Manipulator::SetPart (const AIS_ManipulatorMode theMode, const Standard_Boolean theIsEnabled)
|
||||
{
|
||||
for (Standard_Integer anIt = 0; anIt < 3; ++anIt)
|
||||
{
|
||||
SetPart (anIt, theMode, theIsEnabled);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : EnableMode
|
||||
//purpose :
|
||||
@@ -995,10 +1007,14 @@ void AIS_Manipulator::ComputeSelection (const Handle(SelectMgr_Selection)& theSe
|
||||
{
|
||||
for (Standard_Integer anIt = 0; anIt < 3; ++anIt)
|
||||
{
|
||||
if (!myAxes[anIt].HasTranslation())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
const Axis& anAxis = myAxes[anIt];
|
||||
if (aMode != AIS_MM_None)
|
||||
{
|
||||
anOwner = new AIS_ManipulatorOwner(this, anIt, AIS_MM_Translation, 9);
|
||||
anOwner = new AIS_ManipulatorOwner (this, anIt, AIS_MM_Translation, 9);
|
||||
}
|
||||
// define sensitivity by line
|
||||
Handle(Select3D_SensitiveSegment) aLine = new Select3D_SensitiveSegment (anOwner, gp::Origin(), anAxis.TranslatorTipPosition());
|
||||
@@ -1016,6 +1032,10 @@ void AIS_Manipulator::ComputeSelection (const Handle(SelectMgr_Selection)& theSe
|
||||
{
|
||||
for (Standard_Integer anIt = 0; anIt < 3; ++anIt)
|
||||
{
|
||||
if (!myAxes[anIt].HasRotation())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
const Axis& anAxis = myAxes[anIt];
|
||||
if (aMode != AIS_MM_None)
|
||||
{
|
||||
@@ -1036,6 +1056,10 @@ void AIS_Manipulator::ComputeSelection (const Handle(SelectMgr_Selection)& theSe
|
||||
{
|
||||
for (Standard_Integer anIt = 0; anIt < 3; ++anIt)
|
||||
{
|
||||
if (!myAxes[anIt].HasScaling())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (aMode != AIS_MM_None)
|
||||
{
|
||||
anOwner = new AIS_ManipulatorOwner (this, anIt, AIS_MM_Scaling, 9);
|
||||
|
Reference in New Issue
Block a user