Changeset 3359


Ignore:
Timestamp:
May 27, 2009, 11:23:58 PM (11 years ago)
Author:
ronosman
Message:

Feature 1009 : All selected should be implicit. When Photo selection has no selected item, all items are considered to be implicitly selected.

Location:
extensions/pLoader/trunk/src/Uploader/GUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/pLoader/trunk/src/Uploader/GUI/wxFrameAUI.pm

    r3357 r3359  
    16871687
    16881688    if( scalar @{$self->imagelist->categories} ){
     1689        # all selected is implicit
     1690        if(!scalar @{$self->imageviewer->GetSelectedItems}){
     1691       
     1692            $self->imagelist->image_selection(
     1693                $self->imageviewer->GetAllItems
     1694            );
     1695        }
    16891696       
    16901697        return if( !defined $self->imagelist->image_selection );
  • extensions/pLoader/trunk/src/Uploader/GUI/wxImageListCtrl.pm

    r3229 r3359  
    3838             wxLIST_HITTEST_ONITEM
    3939             wxLIST_NEXT_ALL
    40              wxLIST_STATE_SELECTED
     40             wxLIST_STATE_SELECTED
     41             wxLIST_STATE_DONTCARE
    4142         /;
    4243use Wx::Event qw/
     
    114115}
    115116
     117sub GetAllItems {
     118    my ( $self ) = @_; 
     119
     120  # find selected items
     121  my $item = -1;
     122  my $items = [];
     123  while(1) {
     124      $item = $self->GetNextItem(
     125          $item,     
     126          wxLIST_NEXT_ALL,
     127          wxLIST_STATE_DONTCARE
     128      );
     129      last if(-1 == $item);
     130     
     131      # item is selected       
     132      push @$items, $item
     133  }
     134 
     135  $items;
     136       
     137}
    116138
    117139
Note: See TracChangeset for help on using the changeset viewer.