}
while (!anObjToClear.IsEmpty())
{
- anObjToClear.FindKey (anObjToClear.Size())->ClearSelected();
+ const Handle(AIS_InteractiveObject)& anObj = anObjToClear.FindKey (anObjToClear.Size());
+ const Standard_Integer aHiMode = anObj->HasHilightMode() ? anObj->HilightMode() : 0;
+ myMainPM->Unhighlight (anObj, aHiMode);
+ anObj->ClearSelected();
anObjToClear.RemoveLast();
}
for( i=1; i<=len; i++ )
{
+ if (theOwners.Value (i) == GlobalSelOwner())
+ {
+ const Standard_Integer aHiMode = HasHilightMode() ? HilightMode() : 0;
+ const Quantity_NameOfColor aSelColor = GetContext().IsNull() ? Quantity_NOC_GRAY80 : GetContext()->SelectionColor();
+ thePM->Color (this, aSelColor, aHiMode);
+ continue;
+ }
anOwner = Handle (MeshVS_MeshEntityOwner)::DownCast ( theOwners.Value ( i ) );
if ( !anOwner.IsNull() )
{
const Quantity_NameOfColor Color,
const Handle(SelectMgr_EntityOwner)& Owner)
{
+ if (Owner.IsNull())
+ return;
+
+ if (Owner == GlobalSelOwner())
+ {
+ Standard_Integer aHiMode = HasHilightMode() ? HilightMode() : 0;
+ PM->Color (this, Color, aHiMode, NULL, Graphic3d_ZLayerId_Top);
+ return;
+ }
+
if ( myHilighter.IsNull() )
return;
aHilightPrs->SetTransformPersistence( Presentation()->TransformPersistenceMode(), Presentation()->TransformPersistencePoint() );
//----------------
- if( Owner.IsNull() ) return;
-
const Standard_Boolean isMeshEntityOwner = Owner->IsKind ( STANDARD_TYPE ( MeshVS_MeshEntityOwner ) );
const Standard_Boolean isWholeMeshOwner =
//agv !Owner.IsNull() && Owner==myWholeMeshOwner;
--- /dev/null
+puts "============"
+puts "CR26680"
+puts "============"
+puts ""
+
+##########################################################################################
+puts "Visualization - Changed behavior of mesh visualization and selection in OMF sample"
+##########################################################################################
+
+pload VISUALIZATION XDE
+
+vinit
+meshfromstl m [locate_data_file bug26680.stl]
+meshcolors m elem2 1
+
+vselmode 0 1
+
+vmoveto 200 200
+if {[vreadpixel 197 257 name] != "CYAN1 1"} {
+ puts "ERROR: presentation for dynamic highlight of the object is wrong!"
+}
+vmoveto 0 0
+if {[vreadpixel 197 257 name] != "BLUE2 1"} {
+ puts "ERROR: the object is not unhighlighted after dynamic highlight!"
+}
+
+vselect 200 200
+if {[vreadpixel 197 257 name] != "GRAY80 1"} {
+ puts "ERROR: presentation for selection highlight is wrong!"
+}
+vselect 0 0
+if {[vreadpixel 197 257 name] != "BLUE2 1"} {
+ puts "ERROR: the object is not unhighlighted after selection highlight!"
+}
+
+set only_screen 1