Graphic3d_Structure::Highlight() does not call UnHighlight() anymore.
return;
}
- // Highlight on already Highlighted structure.
- if (myCStructure->highlight)
- {
- Aspect_TypeOfUpdate anUpdateMode = myStructureManager->UpdateMode();
- if (anUpdateMode == Aspect_TOU_WAIT)
- {
- UnHighlight();
- }
- else
- {
- // To avoid call of method : Update()
- // Not useful and can be costly.
- myStructureManager->SetUpdateMode (Aspect_TOU_WAIT);
- UnHighlight();
- myStructureManager->SetUpdateMode (anUpdateMode);
- }
- }
-
SetDisplayPriority (Structure_MAX_PRIORITY - 1);
myCStructure->GraphicHighlight (theStyle, this);
void OpenGl_Structure::GraphicHighlight (const Handle(Graphic3d_HighlightStyle)& theStyle,
const Handle(Graphic3d_Structure)& theStruct)
{
+ if (!myHighlightStyle.IsNull()
+ && myHighlightStyle->Method() == Aspect_TOHM_BOUNDBOX
+ && theStyle->Method() != Aspect_TOHM_BOUNDBOX)
+ {
+ const Handle(OpenGl_Context)& aContext = GlDriver()->GetSharedContext();
+ clearHighlightBox (aContext);
+ }
+
myHighlightStyle = theStyle;
highlight = 1;
--- /dev/null
+puts "==========="
+puts "OCC28061 - Highlighting of any object with HLR option leads to crash"
+puts "==========="
+puts ""
+
+pload MODELING VISUALIZATION
+box b 1 2 3
+
+vclear
+vinit View1
+vdisplay -dispMode 0 b
+vsetwidth -noupdate b 4
+vfit
+vhlr on
+
+vmoveto 250 250
+if { [vreadpixel 321 150 rgb name] != "CYAN1" } { puts "Error: the box is not highlighted" }
+
+vdump $imagedir/${casename}.png