Changeset 8568
- Timestamp:
- 10/03/09 06:01:24 (2 years ago)
- File:
-
- 1 edited
-
trunk/Padre/lib/Padre/Current.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/lib/Padre/Current.pm
r8327 r8568 126 126 unless ( exists $self->{editor} ) { 127 127 my $notebook = $self->notebook; 128 my $selected = $notebook->GetSelection; 129 if ( $selected == -1 ) { 130 $self->{editor} = undef; 131 } elsif ( $selected >= $notebook->GetPageCount ) { 132 $self->{editor} = undef; 133 } else { 134 $self->{editor} = $notebook->GetPage($selected); 135 unless ( $self->{editor} ) { 136 Carp::croak("Failed to find page"); 137 } 138 } 128 if (defined($notebook)){ 129 my $selected = $notebook->GetSelection; 130 if ( $selected == -1 ) { 131 $self->{editor} = undef; 132 } elsif ( $selected >= $notebook->GetPageCount ) { 133 $self->{editor} = undef; 134 } else { 135 $self->{editor} = $notebook->GetPage($selected); 136 unless ( $self->{editor} ) { 137 Carp::croak("Failed to find page"); 138 } 139 }} 139 140 } 140 141 return $self->{editor};
Note: See TracChangeset
for help on using the changeset viewer.
