[Gambas-bugtracker] Bug #1358: Iconview fails to raise click event when selected item clicked

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Thu Jun 28 16:31:19 CEST 2018


http://gambaswiki.org/bugtracker/edit?object=BUG.1358&from=L21haW4-

Comment #1 by Tony MOREHEN:

This behaviour can be changed as follows.  In Iconview.class (gb.gui.base):

Public Sub ScrollArea_MouseUp()
  
  If Not Me.Enabled Or If Me.Design Then Return
  If $aItems.Count = 0 Then Return
  
  If $bSelRect Then
    
    $bSelRect = False
    $hSelTimer = Null
    $hView.View.Refresh
    If $cSelection.Count And If $X1 <> $X2 Or $Y1 <> $Y2 Then SelectionChanged
    ' If Not Mouse.Control Then 
    '   UnselectAll
    '   ToggleSelectRect
    ' Endif
  Else
    
    If $iCurrent >= 0 Then 
      If $iCurrent = $iCurrentBefore Then
        '$aItems[$iCurrent].Rename
      Else
''**** move the following line outside the current If structure
        RaiseEvent(EVENT_CLICK, $iCurrent)
      Endif
''**** move to here
    Endif
    
  Endif
  
End




More information about the Bugtracker mailing list