AIS_InteractiveContext::SetLocation() - update HilightMode instead of DisplayMode.
PrsMgr_PresentationManager::UpdateHighlightTrsf() - fix accessing NULL presentation.
// to its highlight structure immediately
if (!myLastPicked.IsNull() && myLastPicked->IsSameSelectable (theIObj))
{
+ const Standard_Integer aHiMod = theIObj->HasHilightMode() ? theIObj->HilightMode() : 0;
myLastPicked->UpdateHighlightTrsf (myMainVwr,
myMainPM,
- theIObj->HasDisplayMode() ? theIObj->DisplayMode() : 0);
+ aHiMod);
}
}
if (theObj.IsNull())
return;
- const Handle(Prs3d_Presentation)& aBasePrs = Presentation (theObj, theMode, Standard_False)->Presentation();
- const Handle(Prs3d_Presentation)& aParentPrs = theSelObj.IsNull() ?
- aBasePrs : Presentation (theSelObj, theMode, Standard_False)->Presentation();
- const Standard_Integer aParentId = aParentPrs->CStructure()->Id;
+ Handle(PrsMgr_Presentation) aPrs = Presentation (!theSelObj.IsNull() ? theSelObj : theObj, theMode, Standard_False);
+ if (aPrs.IsNull())
+ {
+ return;
+ }
- updatePrsTransformation (myImmediateList, aParentId, aBasePrs->CStructure()->Transformation());
+ Handle(Geom_Transformation) aTrsf = theObj->LocalTransformationGeom();
+ const Standard_Integer aParentId = aPrs->Presentation()->CStructure()->Id;
+ updatePrsTransformation (myImmediateList, aParentId, aTrsf);
if (!myViewDependentImmediateList.IsEmpty())
{
{
updatePrsTransformation (myViewDependentImmediateList,
aViewDepParentPrs->CStructure()->Id,
- aBasePrs->CStructure()->Transformation());
+ aTrsf);
}
}
}
--- /dev/null
+puts "==========="
+puts "OCC27986"
+puts "Visualization - AIS_InteractiveContext::SetLocation() does not update dynamic highlighting"
+puts "Test global selection"
+puts "==========="
+puts ""
+
+pload MODELING VISUALIZATION
+box b 1 2 3
+
+vclear
+vinit View1
+vaxo
+vdisplay -dispMode 0 -highMode 1 b
+vfit
+vzoom 0.5
+vmoveto 250 250
+vsetlocation b 2 1 0
+set aColor1 [vreadpixel 220 200 rgb name]
+set aColor2 [vreadpixel 350 220 rgb name]
+if { "$aColor1" != "BLACK" || "$aColor2" != "DARKTURQUOISE" } { puts "Error: dynamic highlighting is not updated" }
+
+vdump $imagedir/${casename}.png
--- /dev/null
+puts "==========="
+puts "OCC27986"
+puts "Visualization - AIS_InteractiveContext::SetLocation() does not update dynamic highlighting"
+puts "Test local selection"
+puts "==========="
+puts ""
+
+pload MODELING VISUALIZATION
+box b 1 2 3
+
+vclear
+vinit View1
+vaxo
+vdisplay -dispMode 0 -highMode 1 b
+vfit
+vzoom 0.5
+vselmode b 4 1
+vmoveto 250 250
+vsetlocation b 2 1 0
+set aColor1 [vreadpixel 220 200 rgb name]
+set aColor2 [vreadpixel 350 220 rgb name]
+if { "$aColor1" != "BLACK" || "$aColor2" != "DARKTURQUOISE" } { puts "Error: dynamic highlighting is not updated" }
+
+vdump $imagedir/${casename}.png