MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030728Open CASCADE[OCCT] OCCT:Visualizationpublic2019-05-22 17:312019-08-16 16:20
Reporternds 
Assigned Tonds 
PrioritynormalSeverityminor 
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.5.0Fixed in Version 
Summary0030728: Visualization - using one implementation of highlight/unhighlight in context
DescriptionIt is proposed to move logic of highlight/unhighlight in two separate methods in AIS_InteractiveContext and update highlight state by using the methods only.
TagsNo tags attached.
Test case number
Attached Files

- Relationships

-  Notes
(0084552)
git (administrator)
2019-05-22 17:33

Branch CR30728 has been created by nds.

SHA-1: 36b87936acf5a89d573663b5e8d086a4a4a084d3


Detailed log of new commits:

Author: nds
Date: Wed May 22 17:33:02 2019 +0300

    0030728: Visualization - using one implementation of highlight/unhighlight in context
(0084831)
git (administrator)
2019-06-04 22:19

Branch CR30728_1 has been created by nds.

SHA-1: 32b949305614baa81e6e0c6e037d8641be739ab1


Detailed log of new commits:

Author: nds
Date: Wed May 22 17:33:02 2019 +0300

    0030728: Visualization - using one implementation of highlight/unhighlight in context
(0084834)
git (administrator)
2019-06-04 23:16

Branch CR30728_1 has been updated by nds.

SHA-1: ef29a0836580b047dfc63aafdec510ab11f7bdbe


Detailed log of new commits:

Author: nds
Date: Tue Jun 4 23:15:52 2019 +0300

    0030728: Visualization - using one implementation of highlight/unhighlight in context
    
    #compilation correction

(0084835)
git (administrator)
2019-06-04 23:20

Branch CR30728_2 has been created by nds.

SHA-1: dd23cc853300487f6e13bb929800821a099fa29a


Detailed log of new commits:

Author: nds
Date: Tue Jun 4 23:19:59 2019 +0300

    0030728: Visualization - using one implementation of highlight/unhighlight in context
(0084843)
kgv (developer)
2019-06-05 10:02

--- a/src/AIS/AIS_InteractiveContext.cxx
+++ b/src/AIS/AIS_InteractiveContext.cxx
@@ -1947,7 +1947,9 @@ void AIS_InteractiveContext::EraseGlobal (const Handle(AIS_InteractiveObject)& 
t
   }
 
   const Standard_Integer aDispMode = theIObj->HasHilightMode() ? theIObj->HilightMode() : 0;

-  unhighlightOwners (theIObj);
+  AIS_NListOfEntityOwner anOwners;
+  anOwners.Append(theIObj->GlobalSelOwner());
+  unhighlightOwners (anOwners);

I would expect this breaking #0030717 back, doesn't it?
(0085995)
git (administrator)
2019-08-02 15:49

Branch CR30728_3 has been created by nds.

SHA-1: 1ea5dd67b1890fd7002cd2be6682fda2fef09cfb


Detailed log of new commits:

Author: nds
Date: Tue Jun 4 23:19:59 2019 +0300

    0030728: Visualization - using one implementation of highlight/unhighlight in context
    
    (cherry picked from commit dd23cc853300487f6e13bb929800821a099fa29a)
(0086251)
git (administrator)
2019-08-15 07:37

Branch CR30728_3 has been updated by nds.

SHA-1: e62abffbf6139d6d4b39ff8dea87d6e5f178a010


Detailed log of new commits:

Author: nds
Date: Thu Aug 15 07:35:04 2019 +0300

    0030728: Visualization - using one implementation of highlight/unhighlight in context
    
    # correction for regression in clear selection.

(0086252)
git (administrator)
2019-08-15 07:54

Branch CR30728_4 has been created by nds.

SHA-1: 55c834662df4394843ffe5934ae759c394def3d6


Detailed log of new commits:

Author: nds
Date: Tue Jun 4 23:19:59 2019 +0300

    0030728: Visualization - using one implementation of highlight/unhighlight in context
(0086258)
nds (developer)
2019-08-15 12:13

Dear Kirill,

it is ready for review.

Job: http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR30728_3-master-NDS/ [^]
(One failed case comes with WEEK-33 were the branch started)

Thank you in advance, Natalia
(0086288)
kgv (developer)
2019-08-16 16:17

+  //! Helper function that highlights the owners given with <theStyle> with check
+  //! for AutoHighlight, e.g. is used for selection.
+  Standard_EXPORT void highlightOwners (const AIS_NListOfEntityOwner& theOwners,
+                                        const Standard_Boolean& theToUseObjectDisplayMode);

Why Standard_Boolean&?
The description does not match method.

  //! Helper function that highlights the owners given with <theStyle> with check
  //! for AutoHighlight, e.g. is used for selection.
  Standard_EXPORT void unhighlightOwners (const AIS_NListOfEntityOwner& theOwners,
                                          const Standard_Boolean theIsToHilightSubIntensity = Standard_False);


The description does not match method.

-    Handle(AIS_GlobalStatus) aStatus;
-    if (!myObjects.Find (anInteractive, aStatus))
-    {
-      continue;
-    }
+    Handle(AIS_GlobalStatus)& aStatus = myObjects.ChangeFind (anInteractive);
...
-        if (aStatus->IsSubIntensityOn())
+        if (!aStatus.IsNull() && aStatus->IsSubIntensityOn())

This does not work like this - either ChangeFind() should be replaced with seekers, or NULL check should be removed (myObjects never contains NULL entities).
(0086289)
kgv (developer)
2019-08-16 16:20

-    const Standard_Integer aHiMode = getHilightMode (anObj, aStyle, -1);
+  highlightOwners (anOwners, Standard_False/*check if it is really important*/);

As AIS_InteractiveContext::highlightSelected() is expected to be called on displayed object, I think that Standard_False and this flag is unnecessary.

- Issue History
Date Modified Username Field Change
2019-05-22 17:31 nds New Issue
2019-05-22 17:31 nds Assigned To => kgv
2019-05-22 17:33 git Note Added: 0084552
2019-05-22 17:35 nds Assigned To kgv => nds
2019-06-04 22:19 git Note Added: 0084831
2019-06-04 23:16 git Note Added: 0084834
2019-06-04 23:20 git Note Added: 0084835
2019-06-05 10:02 kgv Note Added: 0084843
2019-07-17 07:04 nds Target Version 7.4.0* => 7.5.0
2019-08-02 15:49 git Note Added: 0085995
2019-08-15 07:37 git Note Added: 0086251
2019-08-15 07:54 git Note Added: 0086252
2019-08-15 12:13 nds Note Added: 0086258
2019-08-15 12:13 nds Assigned To nds => kgv
2019-08-15 12:13 nds Status new => resolved
2019-08-16 16:17 kgv Note Added: 0086288
2019-08-16 16:17 kgv Assigned To kgv => nds
2019-08-16 16:17 kgv Status resolved => assigned
2019-08-16 16:20 kgv Note Added: 0086289


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker