ic->InitSelected();
if ( pe->modifiers() == Qt::ShiftModifier )
- ic->ShiftSelect(); // Append selection
+ ic->ShiftSelect( Standard_True ); // Append selection
else
- ic->Select(); // New selection
+ ic->Select( Standard_True ); // New selection
ic->InitSelected();
if ( ic->MoreSelected() ) {
}
else {
if ( theContext->HasOpenedContext() )
- theContext->CloseAllContexts();
+ theContext->CloseAllContexts( Standard_True );
}
}
{
Handle(AIS_InteractiveContext) aCtx = getAISContext();
if ( !aCtx.IsNull() )
- aCtx->ClearSelected();
+ aCtx->ClearSelected( Standard_True );
}
return;
}
// otherwise a rectangular selection.
if ( myStartPoint == myEndPoint )
{
- aCtx->MoveTo( myEndPoint.x(), myEndPoint.y(), aView3d );
+ aCtx->MoveTo( myEndPoint.x(), myEndPoint.y(), aView3d, Standard_True );
if ( aHasShift )
- aCtx->ShiftSelect();
+ aCtx->ShiftSelect( Standard_True );
else
- aCtx->Select();
+ aCtx->Select( Standard_True );
}
else
{
ic->InitSelected();
if ( pe->modifiers() == Qt::ShiftModifier )
- ic->ShiftSelect(); // Append selection
+ ic->ShiftSelect( Standard_True ); // Append selection
else
- ic->Select(); // New selection
+ ic->Select( Standard_True ); // New selection
ic->InitSelected();
if ( ic->MoreSelected() ) {
Handle(AIS_InteractiveContext) ic = anOCCViewer->getAISContext();
ic->InitSelected();
- ic->Select(); // New selection
+ ic->Select( Standard_True ); // New selection
ic->InitSelected();
TopoDS_Shape aShape;
if ( !S1.IsNull() ) {
/* erase any previous */
ic->Erase( mySimulationShape1, Standard_True );
- ic->ClearPrs( mySimulationShape1 );
+ ic->ClearPrs( mySimulationShape1, 0, Standard_True );
mySimulationShape1 = new AIS_Shape( TopoDS_Shape() );
mySimulationShape1->Set( S1 );
}
if ( !S2.IsNull() ) {
ic->Erase( mySimulationShape2, Standard_True );
- ic->ClearPrs( mySimulationShape2 );
+ ic->ClearPrs( mySimulationShape2, 0, Standard_True );
mySimulationShape2 = new AIS_Shape( TopoDS_Shape() );
mySimulationShape2->Set( S2 );
Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
ic->Erase( mySimulationShape1, Standard_True );
ic->Erase( mySimulationShape2, Standard_True );
- ic->ClearPrs( mySimulationShape1 );
- ic->ClearPrs( mySimulationShape2 );
+ ic->ClearPrs( mySimulationShape1, 0, Standard_True );
+ ic->ClearPrs( mySimulationShape2, 0, Standard_True );
ic->UpdateCurrentViewer();
}
}
// Set color for temporary AIS_InteractiveObject
anAISObj->Attributes()->WireAspect()->SetColor( Quantity_NOC_VIOLET );
- aCtx->Redisplay( anAISObj );
+ aCtx->Redisplay( anAISObj, Standard_True );
}
}
}
Handle(GEOM_Annotation) aPresentation = Handle(GEOM_Annotation)::DownCast( aPrs );
GEOMGUI_AnnotationAttrs::SetupPresentation( aPresentation, theProperty, aShapeLCS );
- aView->getAISContext()->Redisplay( aPresentation );
+ aView->getAISContext()->Redisplay( aPresentation, Standard_True );
}
}
}
setDisplayProperties( aPresentation, aView, theEntry );
- aView->getAISContext()->Redisplay( aPresentation );
+ aView->getAISContext()->Redisplay( aPresentation, Standard_True );
}
}
getDisplayer()->UpdateViewer();
if ( !ic.IsNull() )
{
if ( ic->HasOpenedContext() )
- ic->CloseAllContexts();
+ ic->CloseAllContexts(Standard_True);
}
}
}
aView->ColorScaleErase();
#else
if( !aViewModel->getAISContext()->IsDisplayed( myColorScale ) )
- aViewModel->getAISContext()->Display( myColorScale );
+ aViewModel->getAISContext()->Display( myColorScale, Standard_True);
}
else
if( aViewModel->getAISContext()->IsDisplayed( myColorScale ) )
- aViewModel->getAISContext()->Erase( myColorScale );
+ aViewModel->getAISContext()->Erase( myColorScale, Standard_True );
#endif
if( theIsRedisplayFieldSteps )
const Handle(AIS_InteractiveContext) anAISContext = myViewer->getAISContext();
- anAISContext->MoveTo( aMouseEv->x(), aMouseEv->y(), aView3d );
+ anAISContext->MoveTo( aMouseEv->x(), aMouseEv->y(), aView3d, Standard_True );
if ( !anAISContext->HasDetected() )
{
anAISContext->Update( myActiveIO, Standard_False );
anAISContext->UpdateCurrentViewer();
- anAISContext->MoveTo( aMouseEv->pos().x(), aMouseEv->pos().y(), aView3d );
+ anAISContext->MoveTo( aMouseEv->pos().x(), aMouseEv->pos().y(), aView3d, Standard_True );
emit SignalInteractionFinished( myActiveIO );
anAISContext->SetZLayer( myDimension, myEditingLayer );
anAISContext->Activate( myDimension, AIS_DSM_Line );
anAISContext->Activate( myDimension, AIS_DSM_Text );
- anAISContext->Redisplay( myDimension );
+ anAISContext->Redisplay( myDimension , Standard_True );
}
//=================================================================================
Handle(V3d_Viewer) aViewer3d = myEditingViewer->getViewer3d();
aViewer3d->RemoveZLayer( myEditingLayer );
- anAISContext->CloseLocalContext();
+ anAISContext->CloseLocalContext( Standard_True );
myEditingViewer = NULL;
}
if ( aNewFlyout <= Precision::Confusion() )
{
myInteractedIO->SetFlyout( 0.0 );
- myViewer->getAISContext()->Redisplay( myInteractedIO );
+ myViewer->getAISContext()->Redisplay( myInteractedIO, Standard_True );
return;
}
myInteractedIO->SetFlyout( aNewFlyout );
myInteractedIO->SetCustomPlane( aNewPlane );
- myViewer->getAISContext()->Redisplay( myInteractedIO );
+ myViewer->getAISContext()->Redisplay( myInteractedIO, Standard_True );
}
//=================================================================================
myInteractedIO->SetFlyout( aFlyout );
- myViewer->getAISContext()->Redisplay( myInteractedIO );
+ myViewer->getAISContext()->Redisplay( myInteractedIO, Standard_True );
}
//=================================================================================
myInteractedIO->DimensionAspect()->SetArrowOrientation( aArrPos );
myInteractedIO->SetToUpdate();
- myViewer->getAISContext()->Redisplay( myInteractedIO );
+ myViewer->getAISContext()->Redisplay( myInteractedIO, Standard_True );
}
//=================================================================================
QMouseEvent* aMouseEv = dynamic_cast<QMouseEvent*>( theEvent );
// init detection
- anAISContext->MoveTo( aMouseEv->x(), aMouseEv->y(), aView3d );
+ anAISContext->MoveTo( aMouseEv->x(), aMouseEv->y(), aView3d, Standard_True );
if ( !anAISContext->HasDetected() )
{
return false;
}
anAISContext->ClearSelected( Standard_False );
- anAISContext->AddOrRemoveSelected( aDetectedOwner );
+ anAISContext->AddOrRemoveSelected( aDetectedOwner, Standard_True );
emit InteractionStarted( myInteractedIO );
SetDisplayMode( 0 );
SetZLayer( Graphic3d_ZLayerId_Default );
SetAutoHide( Standard_True );
+#if OCC_VERSION_LARGE <= 0x07010000
SetHilightMode( HighlightAll );
+#endif
SetMutable( Standard_True );
SetDepthCulling( Standard_True );
const Standard_Integer theTextHeight,
const OpenGl_GraphicDriver* theDriver )
: OpenGl_Element(),
- myDepthMode( 0 ),
myAISObject( theAnnotation ),
myText( theAnnotation->myText.ToExtString() ),
+ myDepthMode( 0 ),
myTextLineY( 0.f ),
myTextDPI( 0 )
{
return;
}
}
-
+#if OCC_VERSION_LARGE > 0x07010000
+ const Handle(Graphic3d_PresentationAttributes) aHighlightStyle = theWorkspace->HighlightStyle();
+ if (!aHighlightStyle.IsNull() && myAISObject->myHilightMode == HighlightLabel)
+ {
+ Handle(Graphic3d_PresentationAttributes) empty;
+ theWorkspace->SetHighlightStyle(empty);
+ theWorkspace->ApplyAspectLine();
+ }
+#else
const bool toHighlight = theWorkspace->ToHighlight();
if (toHighlight && myAISObject->myHilightMode == HighlightLabel)
theWorkspace->SetHighlight( false );
theWorkspace->ApplyAspectLine();
}
-
+#endif
+
GLint myOldDepthMode = 0;
if ( myDepthMode )
}
aContext->ApplyModelViewMatrix();
-
+
+#if OCC_VERSION_LARGE > 0x07010000
+ theWorkspace->SetHighlightStyle(aHighlightStyle);
+#else
if ( toHighlight != theWorkspace->ToHighlight() )
{
theWorkspace->SetHighlight( toHighlight );
}
+#endif
}
// =======================================================================
// purpose : Perform highlighting of the presentation.
// =======================================================================
void GEOM_Annotation::GEOM_AnnotationOwner::HilightWithColor( const Handle(PrsMgr_PresentationManager3d)& thePM,
- const Handle(Graphic3d_HighlightStyle)& theStyle,
+#if OCC_VERSION_LARGE > 0x07010000
+ const Handle(Prs3d_Drawer)& theStyle,
+#else
+ const Handle(Graphic3d_HighlightStyle)& theStyle,
+#endif
const Standard_Integer theMode )
{
if ( myPrsSh.IsNull() )
{
Handle(Prs3d_Drawer) aDrawer = new Prs3d_Drawer;
+#if OCC_VERSION_LARGE > 0x07010000
+ aDrawer->Link( theStyle );
+#else
aDrawer->Link( Selectable()->HilightAttributes() );
-
+#endif
Handle(Prs3d_IsoAspect) aUIsoAspect = new Prs3d_IsoAspect(
aDrawer->UIsoAspect()->Aspect()->Color(),
aDrawer->UIsoAspect()->Aspect()->Type(),
}
myPrsSh->SetZLayer ( Selectable()->ZLayer() );
-
+
thePM->Color( Selectable(), theStyle, theMode, NULL, Graphic3d_ZLayerId_Topmost );
thePM->Color( myPrsSh, theStyle, theMode, Selectable(), Graphic3d_ZLayerId_Topmost );
const Standard_Integer theMode )
{
SelectMgr_EntityOwner::Unhilight( thePM, theMode );
-
+
+#if OCC_VERSION_LARGE > 0x07010000
+ thePM->Unhighlight( myPrsSh );
+#else
thePM->Unhighlight( myPrsSh, theMode );
+#endif
}
// =======================================================================
#ifndef GEOM_Annotation_HeaderFile
#define GEOM_Annotation_HeaderFile
+#include <Basics_OCCTVersion.hxx>
+
#include <AIS_InteractiveObject.hxx>
#include <Bnd_Box.hxx>
#include <Font_FontAspect.hxx>
//! \param theMode [in] the display mode.
virtual void
HilightWithColor( const Handle(PrsMgr_PresentationManager3d)& thePM,
- const Handle(Graphic3d_HighlightStyle)& theStyle,
+#if OCC_VERSION_LARGE > 0x07010000
+ const Handle(Prs3d_Drawer)& theStyle,
+#else
+ const Handle(Graphic3d_HighlightStyle)& theStyle,
+#endif
const Standard_Integer theMode = 0 ) Standard_OVERRIDE;
//! Removes highlighting from the type of shape.