mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
0022048: Visualization, AIS_InteractiveContext - single object selection should always clear multiple selection
AIS_InteractiveContext::Select() now clears multiple selection when selecting a single object.
This commit is contained in:
@@ -564,7 +564,9 @@ AIS_StatusOfPick AIS_InteractiveContext::Select (const Standard_Boolean toUpdate
|
||||
clearDynamicHighlight();
|
||||
if (myWasLastMain && !myLastinMain.IsNull())
|
||||
{
|
||||
if (!myLastinMain->IsSelected() || myLastinMain->IsForcedHilight())
|
||||
if (!myLastinMain->IsSelected()
|
||||
|| myLastinMain->IsForcedHilight()
|
||||
|| NbSelected() > 1)
|
||||
{
|
||||
SetSelected (myLastinMain, Standard_False);
|
||||
if(toUpdateViewer)
|
||||
@@ -1431,13 +1433,11 @@ void AIS_InteractiveContext::EntityOwners(Handle(SelectMgr_IndexedMapOfOwner)& t
|
||||
//=======================================================================
|
||||
Standard_Integer AIS_InteractiveContext::NbSelected()
|
||||
{
|
||||
Standard_Integer aNbSelected = 0;
|
||||
for (InitSelected(); MoreSelected(); NextSelected())
|
||||
if (HasOpenedContext())
|
||||
{
|
||||
aNbSelected++;
|
||||
return myLocalContexts (myCurLocalIndex)->Selection()->Extent();
|
||||
}
|
||||
|
||||
return aNbSelected;
|
||||
return mySelection->Extent();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -91,8 +91,8 @@ public:
|
||||
Standard_Boolean AcceptErase() const;
|
||||
|
||||
Standard_EXPORT void SetContext (const Handle(AIS_InteractiveContext)& aCtx);
|
||||
|
||||
const Handle(AIS_Selection) Selection() const;
|
||||
|
||||
const Handle(AIS_Selection)& Selection() const { return mySelection; }
|
||||
|
||||
Standard_EXPORT void Terminate (const Standard_Boolean updateviewer = Standard_True);
|
||||
|
||||
|
@@ -18,9 +18,6 @@
|
||||
|
||||
#include <SelectMgr_OrFilter.hxx>
|
||||
|
||||
inline const Handle(AIS_Selection) AIS_LocalContext::Selection() const
|
||||
{return mySelection;}
|
||||
|
||||
inline void AIS_LocalContext::SetAutomaticHilight(const Standard_Boolean aStatus)
|
||||
{myAutoHilight = aStatus;}
|
||||
|
||||
|
Reference in New Issue
Block a user