Faculty of Information Technology
Software Engineering Group

Ticket #144: libtool_fix_1_of_1_rev_d3a2cc2bb3f8_Issue__144__Fixed_slip_in__Tools__ChangeSetBrowser2_____changeMenuApply__.patch

File libtool_fix_1_of_1_rev_d3a2cc2bb3f8_Issue__144__Fixed_slip_in__Tools__ChangeSetBrowser2_____changeMenuApply__.patch, 1.7 KB (added by Jan Vrany, 3 years ago)
  • Tools__ChangeSetBrowser2.st

    # HG changeset patch
    # User Jan Vrany <jan.vrany@fit.cvut.cz>
    # Date 1494000868 -3600
    #      Fri May 05 17:14:28 2017 +0100
    # Branch jv
    # Node ID d3a2cc2bb3f82fa08bf064d17dbb075dae89b969
    # Parent  e33388a7f0d67b5780a46d31dfacd38c912c6013
    Issue #144: Fixed slip in `Tools::ChangeSetBrowser2 >> #changeMenuApply:`
    
    ...caused likely by some refactoring in the past. Since I don't
    use the menu pick, I did not noticed. My bad.
    
    https://swing.fit.cvut.cz/projects/stx-jv/ticket/144
    
    diff -r e33388a7f0d6 -r d3a2cc2bb3f8 Tools__ChangeSetBrowser2.st
    a b  
    32503250    self changesDo:[:chg|chg removed ifFalse:[changesToApply add: chg]].
    32513251    self changeMenuApplyChanges: changesToApply.
    32523252    "Advance to next change"
    3253     changeIdx := changeList list identityIndexOf: changesToApply last change.
    3254     changeIdx < changeList list size ifTrue:[
    3255         changeList selection: { changeList list at: changeIdx + 1 }
     3253    changeIdx := changeList list findFirst: [:each | each change == changesToApply last ].
     3254    changeIdx <= changeList list size ifTrue:[
     3255        changeIdx := changeIdx min: changeList list size.
     3256        changeList selection: { changeList list at: (changeIdx + 1 min: changeList list size)}
    32563257    ] ifFalse:[
    32573258        changeList redrawListItemAt: changeIdx.
    32583259    ].
     
    32653266    "Created: / 04-08-2011 / 17:26:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    32663267    "Modified: / 28-12-2011 / 15:49:00 / cg"
    32673268    "Modified: / 25-04-2015 / 22:17:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     3269    "Modified: / 05-05-2017 / 17:04:16 / jv"
    32683270!
    32693271
    32703272changeMenuApplySelection: changeList