From 4978fe7753206a4e4bcd4e7ea6df61e57d01929a Mon Sep 17 00:00:00 2001
From: Michal Jurosz <mj@mj41.cz>
Date: Sat, 11 Aug 2012 21:23:49 +0200
Subject: [PATCH 4/4] Fix recreation of files deleted by process outside of
Padre.
---
Padre/lib/Padre/Wx/Main.pm | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/Padre/lib/Padre/Wx/Main.pm b/Padre/lib/Padre/Wx/Main.pm
index fb68314..36c1bf2 100644
|
a
|
b
|
sub reload_editor { |
| 4584 | 4584 | my $self = shift; |
| 4585 | 4585 | my $editor = shift || $self->current->editor or return 0; |
| 4586 | 4586 | my $document = $editor->document or return 0; |
| 4587 | | my $lock = $editor->lock_update; |
| | 4587 | |
| | 4588 | # If file doesn't exist close the tab |
| | 4589 | unless ( -e $document->{filename} ) { |
| | 4590 | my $id = $self->editor_of_file( $document->{filename} ); |
| | 4591 | $self->delete($id); |
| | 4592 | return 1; |
| | 4593 | } |
| | 4594 | |
| | 4595 | my $lock = $editor->lock_update; |
| 4588 | 4596 | |
| 4589 | 4597 | # Capture where we are in the document |
| 4590 | 4598 | my $line = $editor->LineFromPosition( $editor->GetCurrentPos ); |