MantisBT - Open CASCADE
View Issue Details
0030726Open CASCADE[OCCT] OCCT:Visualizationpublic2019-05-22 13:102019-06-08 13:21
nds 
bugmaster 
lowintegration request 
closedfixed 
 
[OCCT] 7.4.0[OCCT] 7.4.0 
Not required
0030726: Visualization - change Selected state of owner within AIS_Selection instead of AIS_InteractiveContext
Selected state of SelectMgr_EntityOwner means whether the owner selected or not.

It is proposed to move this state update from context into AIS_Selection.
Almost in all cases of this state update, we call Select/AddTo/Clear of AIS_Selection and, after, update the state of the owner in context now.

This logic, separated between two classes, might lead to incorrect update of selected state of the owner.

No tags attached.
Issue History
2019-05-22 13:10ndsNew Issue
2019-05-22 13:10ndsAssigned To => kgv
2019-05-22 13:10ndsAssigned Tokgv => nds
2019-05-22 13:10ndsPrioritynormal => low
2019-05-22 13:13gitNote Added: 0084539
2019-05-22 14:24gitNote Added: 0084545
2019-06-04 22:12gitNote Added: 0084826
2019-06-05 10:10ndsNote Added: 0084846
2019-06-05 10:10ndsAssigned Tonds => kgv
2019-06-05 10:10ndsStatusnew => resolved
2019-06-05 10:17kgvNote Added: 0084847
2019-06-05 10:17kgvSummaryVisualization - change Selected state of owner in AIS_Selection => Visualization - change Selected state of owner within AIS_Selection instead of AIS_InteractiveContext
2019-06-05 10:18kgvAssigned Tokgv => nds
2019-06-05 10:18kgvSeverityminor => integration request
2019-06-05 10:18kgvStatusresolved => assigned
2019-06-06 11:51gitNote Added: 0084906
2019-06-06 11:58ndsNote Added: 0084908
2019-06-06 11:58ndsAssigned Tonds => kgv
2019-06-06 11:58ndsStatusassigned => resolved
2019-06-06 12:01kgvNote Added: 0084909
2019-06-06 12:01kgvAssigned Tokgv => bugmaster
2019-06-06 12:01kgvStatusresolved => reviewed
2019-06-06 19:13bugmasterNote Added: 0084939
2019-06-06 19:13bugmasterStatusreviewed => tested
2019-06-06 19:13bugmasterTest case number => Not required
2019-06-08 13:11bugmasterChangeset attached => occt master 8d2c79f4
2019-06-08 13:11bugmasterStatustested => verified
2019-06-08 13:11bugmasterResolutionopen => fixed
2019-06-08 13:20gitNote Added: 0084953
2019-06-08 13:20gitNote Added: 0084955
2019-06-08 13:21gitNote Added: 0084964

Notes
(0084539)
git   
2019-05-22 13:13   
Branch CR30726 has been created by nds.

SHA-1: de3dec2077b7d4d14fd6a6d5b72b4d290a4b88d6


Detailed log of new commits:

Author: nds
Date: Wed May 22 13:13:33 2019 +0300

    0030726: Visualization - change Selected state of owner in AIS_Selection
(0084545)
git   
2019-05-22 14:24   
Branch CR30726 has been updated by nds.

SHA-1: 7d778441498ef0f0f545c800c671ee693bb5cf05


Detailed log of new commits:

Author: nds
Date: Wed May 22 14:24:12 2019 +0300

    0030726: Visualization - change Selected state of owner in AIS_Selection
    
    # IsHilighted by owner should use the same logic like when it is highlighted. IsSelected is used for selection state, not highlight.
    #
    # Without this correction, object is never shown as selected by click (Select(bool)):
    # if (!HighlightStyle (theOwner, aCustomStyle) ||
    # (!aCustomStyle.IsNull() && aCustomStyle != anObjSelStyle))
    # IsSelected is already true, so the highlight style is equal to selection style, nothing to do.

(0084826)
git   
2019-06-04 22:12   
Branch CR30726_1 has been created by nds.

SHA-1: 1fb65e1396c98353e9ee0c0a14d4354531b74937


Detailed log of new commits:

Author: nds
Date: Wed May 22 13:13:33 2019 +0300

    0030726: Visualization - change Selected state of owner in AIS_Selection
    
    # IsHilighted by owner should use the same logic like when it is highlighted. IsSelected is used for selection state, not highlight.
    #
    # Without this correction, object is never shown as selected by click (Select(bool)):
    # if (!HighlightStyle (theOwner, aCustomStyle) ||
    # (!aCustomStyle.IsNull() && aCustomStyle != anObjSelStyle))
    # IsSelected is already true, so the highlight style is equal to selection style, nothing to do.
(0084846)
nds   
2019-06-05 10:10   
Dear Kirill,

could you please review it.

Job on Jenkins is: http://jenkins-test-12.nnov.opencascade.com/view/CR30726-master-NDS/ [^]

Thank you in advance,
Natalia
(0084847)
kgv   
2019-06-05 10:17   
> # IsHilighted by owner should use the same logic like when it is highlighted. IsSelected is used for selection state, not highlight.
> #
> # Without this correction, object is never shown as selected by click (Select(bool)):
Please remove # from commit description - just put comments without prefix.

Please also document in commit that AIS_InteractiveContext::IsHilighted() behavior has been changed.
(0084906)
git   
2019-06-06 11:51   
Branch CR30726_2 has been created by nds.

SHA-1: c9f43340646a40b5deb4190550b940beb00a1559


Detailed log of new commits:

Author: nds
Date: Thu Jun 6 11:50:21 2019 +0300

    0030726: Visualization - change Selected state of owner in AIS_Selection
    
    AIS_InteractiveContext::IsHilighted() behavior has been changed.
    It should use the same logic for owner processing like when it is highlighted. IsSelected of owner is used for selection state, not highlight.
    
     Without this correction, object is never shown as selected by click (Select(bool)):
     if (!HighlightStyle (theOwner, aCustomStyle) ||
        (!aCustomStyle.IsNull() && aCustomStyle != anObjSelStyle))
    
     IsSelected is already true, so the highlight style is equal to selection style, nothing to do.
(0084908)
nds   
2019-06-06 11:58   
Dear Kirill,

Corrected. Jenkins job is the same.

Best regards, Natalia
(0084909)
kgv   
2019-06-06 12:01   
Please raise the patch.
(0084939)
bugmaster   
2019-06-06 19:13   
Combination -
OCCT branch : CR30726_1
master SHA - 1fb65e1396c98353e9ee0c0a14d4354531b74937
d67d4b811012eef8913d3c535c29654d0acf3c4c
Products branch : master SHA - c337118ac41004248abf27585e4c0e972f1a923e
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: 16285.500000000035 / 16313.930000000051 [-0.17%]
Products
Total CPU difference: 10549.590000000051 / 10490.14000000005 [+0.57%]
Windows-64-VC14:
OCCT
Total CPU difference: 17693.390625 / 17714.90625 [-0.12%]
Products
Total CPU difference: 12089.5625 / 12054.984375 [+0.29%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0084953)
git   
2019-06-08 13:20   
Branch CR30726_2 has been deleted by inv.

SHA-1: c9f43340646a40b5deb4190550b940beb00a1559
(0084955)
git   
2019-06-08 13:20   
Branch CR30726_1 has been deleted by inv.

SHA-1: 1fb65e1396c98353e9ee0c0a14d4354531b74937
(0084964)
git   
2019-06-08 13:21   
Branch CR30726 has been deleted by inv.

SHA-1: 7d778441498ef0f0f545c800c671ee693bb5cf05