Archived issue #0030784
Visualization - check if selectable of owner in internal container in AIS_InteractiveContext before using
Description
In some methods of interactive context global status of interactive object is obtained from myObjects without a check if the object is registered inside.
Public activity
20 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Tue May 14 14:31:43 2019 +0300
0030784: Visualization - check if selectable of owner in internal container in AIS_InteractiveContext before using
# todo - add similar check for other places where needed
[revision removed]
Detailed log of new commits:
Author: Author
Date: Tue May 14 14:31:43 2019 +0300
0030784: Visualization - check if selectable of owner in internal container in AIS_InteractiveContext before using
# todo - add similar check for other places where needed
const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (theOwner->Selectable());
+ if (!myObjects.IsBound(anObj))
+ return;
const Standard_Boolean isGlobal = anObj->GlobalSelOwner() == theOwner;
Handle(AIS_GlobalStatus)& aStatus = myObjects.ChangeFind (anObj);
NCollection_DataMap::ChangeSeek()
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Tue May 14 14:31:43 2019 +0300
0030784: Visualization - check if selectable of owner in internal container in AIS_InteractiveContext before using
# todo - add similar check for other places where needed
(cherry picked from [revision removed])
[revision removed]
Detailed log of new commits:
Author: Author
Date: Tue May 14 14:31:43 2019 +0300
0030784: Visualization - check if selectable of owner in internal container in AIS_InteractiveContext before using
# todo - add similar check for other places where needed
(cherry picked from [revision removed])
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Fri Sep 4 19:08:29 2020 +0300
0030784: Visualization - check if selectable of owner in internal container in AIS_InteractiveContext before using
[revision removed]
Detailed log of new commits:
Author: Author
Date: Fri Sep 4 19:08:29 2020 +0300
0030784: Visualization - check if selectable of owner in internal container in AIS_InteractiveContext before using
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Dear Kirill,
could you please review patch.
Thank you a lot, Natalia
could you please review patch.
Thank you a lot, Natalia
+ if (aStatusPtr) + (*aStatusPtr)->SetHilightStatus (Standard_False); ... + if (!aStatusPtr) + return;
Please add brackets.
@@ -172,20 +172,16 @@ void AIS_InteractiveContext::unhighlightOwners (const AIS_NListOfEntityOwner& th
{
- Handle(AIS_GlobalStatus) aStatus;
- if (!myObjects.Find (anInteractive, aStatus))
- {
- continue;
- }
+ Handle(AIS_GlobalStatus)* aStatusPtr = myObjects.ChangeSeek (anInteractive);
This change contradicts to bug description - it allows handling objects not registered in Interactive Context.
Is there real necessity / valid use cases for this behavior?
+ Handle(AIS_GlobalStatus)* aStatusPtr = myObjects.ChangeSeek (aSelectable); + if (aStatusPtr) + (*aStatusPtr)->SetHilightStatus (Standard_False);
Tip:
> if (Handle(AIS_GlobalStatus)* aStatusPtr = myObjects.ChangeSeek (aSelectable))
> {
> (*aStatusPtr)->SetHilightStatus (false);
> }
Branch [archived branch] has been updated by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Fri Sep 4 19:08:29 2020 +0300
remarks correction
[revision removed]
Detailed log of new commits:
Author: Author
Date: Fri Sep 4 19:08:29 2020 +0300
remarks correction
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Mon Sep 7 23:00:50 2020 +0300
0030784: Visualization - check if selectable of owner in internal container in AIS_InteractiveContext before using
[revision removed]
Detailed log of new commits:
Author: Author
Date: Mon Sep 7 23:00:50 2020 +0300
0030784: Visualization - check if selectable of owner in internal container in AIS_InteractiveContext before using
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Dear Kirill,
corrected, could you please review again.
Jenkins job is: http://jenkins-test-12.nnov.opencascade.com/view/CR30784-master-nds/
Thank you a lot, Natalia
corrected, could you please review again.
Jenkins job is: http://jenkins-test-12.nnov.opencascade.com/view/CR30784-master-nds/
Thank you a lot, Natalia
+ if (!aStatusPtr) + continue;
Please add brackets.
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
corrected, thank you.
OCCT: CR30784_3,
PRODUCTS: NOT
PRODUCTS: NOT
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17333.360000000142 / 17325.800000000123 [+0.04%]
Products
Total CPU difference: 12056.720000000096 / 12079.64000000011 [-0.19%]
Windows-64-VC14:
OCCT
Total CPU difference: 18817.921875 / 18792.46875 [+0.14%]
Products
Total CPU difference: 13294.09375 / 13274.75 [+0.15%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17333.360000000142 / 17325.800000000123 [+0.04%]
Products
Total CPU difference: 12056.720000000096 / 12079.64000000011 [-0.19%]
Windows-64-VC14:
OCCT
Total CPU difference: 18817.921875 / 18792.46875 [+0.14%]
Products
Total CPU difference: 13294.09375 / 13274.75 [+0.15%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]