mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0030737: Visualization - implementing new selection schemes in context
AIS_SelectionScheme enumeration is defined to set which selection behaviour is used in Select of context AIS_InteractiveContext is corrected to use single Select method instead of combination of Select/ShiftSelect methods with a selection scheme parameter. Upgrade: Select() -> SelectDetected/Rectangle/Polygon(AIS_SelectionScheme_Replace), ShiftSelect -> SelectDetected/Rectangle/Polygon(AIS_SelectionScheme_XOR)
This commit is contained in:
@@ -327,8 +327,12 @@ void CHLRView3D::DragEvent(const Standard_Integer x ,
|
||||
theButtonDownY=y;
|
||||
}
|
||||
|
||||
if (TheState == 0)
|
||||
GetDocument()->GetAISContext()->Select(theButtonDownX,theButtonDownY,x,y,myView);
|
||||
if (TheState == 0)
|
||||
{
|
||||
GetDocument()->GetAISContext()->SelectRectangle (Graphic3d_Vec2i (theButtonDownX,theButtonDownY),
|
||||
Graphic3d_Vec2i (x,y),
|
||||
myView);
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------
|
||||
@@ -337,7 +341,7 @@ void CHLRView3D::DragEvent(const Standard_Integer x ,
|
||||
void CHLRView3D::InputEvent(const Standard_Integer x ,
|
||||
const Standard_Integer y )
|
||||
{
|
||||
GetDocument()->GetAISContext()->Select();
|
||||
GetDocument()->GetAISContext()->SelectDetected();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------
|
||||
@@ -374,8 +378,13 @@ void CHLRView3D::MultiDragEvent(const Standard_Integer x ,
|
||||
theButtonDownY=y;
|
||||
}
|
||||
|
||||
if (TheState == 0)
|
||||
GetDocument()->GetAISContext()->ShiftSelect(theButtonDownX,theButtonDownY,x,y,myView);
|
||||
if (TheState == 0)
|
||||
{
|
||||
GetDocument()->GetAISContext()->SelectRectangle (Graphic3d_Vec2i (theButtonDownX,theButtonDownY),
|
||||
Graphic3d_Vec2i (x,y),
|
||||
myView,
|
||||
AIS_SelectionScheme_XOR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -385,6 +394,6 @@ void CHLRView3D::MultiDragEvent(const Standard_Integer x ,
|
||||
void CHLRView3D::MultiInputEvent(const Standard_Integer x ,
|
||||
const Standard_Integer y )
|
||||
{
|
||||
GetDocument()->GetAISContext()->ShiftSelect();
|
||||
GetDocument()->GetAISContext()->SelectDetected (AIS_SelectionScheme_XOR);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user