Ticket #331: Main.pm.diff

File Main.pm.diff, 662 bytes (added by waxhead, 5 years ago)
  • lib/Padre/Wx/Main.pm

     
    27252725 
    27262726sub on_save_all { 
    27272727    my $self = shift; 
     2728    my $currentID = $self->notebook->GetSelection; 
    27282729    foreach my $id ( $self->pageids ) { 
    27292730        my $editor = $self->notebook->GetPage($id) or next; 
     2731        $editor->SetFocus; 
    27302732        my $doc = $editor->{Document};    # TODO no accessor for document? 
    27312733        if ( $doc->is_modified ) { 
    27322734            $self->on_save($doc) or return 0; 
    27332735        } 
    27342736    } 
     2737    # set focus back to the currentDocument 
     2738    $self->notebook->SetSelection($currentID); 
    27352739    return 1; 
    27362740} 
    27372741