Ticket #85 (closed defect: fixed)
fix a bug (open many window for 1 file)
| Reported by: | fayland | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | editor | Version: | 0.14 |
| Keywords: | Cc: |
Description
lib/Padre/Wx/MainWindow.pm
@@ -735,6 +735,16 @@
# current file otherwise open a new buffer and open the file there.
sub setup_editor {
my ($self, $file) = @_;
+
+ # before open it, please check if it's already opened.
+ # if yes, just focus that tab instead create a new one
+ my @pages = $self->pages;
+ foreach my $i ( 0 .. $#pages ) {
+ if ( $pages[$i]->{Document}->filename eq $file ) {
+ $self->on_nth_pane($i);
+ return;
+ }
+ }
local $self->{_no_refresh} = 1;
it works fine in my machine. mainly it prevents to open another tab for one opened file.
if you need a patch again your subversion or even I write it myself in your trunk, please ask me.
thanks.

i think this was already added in SVN trunk, please check that.