Opened 12 years ago

Closed 12 years ago

#93 closed defect (fixed)

wxNotebook/wxAuiNotebook incompatibility

Reported by: hjansen Owned by:
Priority: major Milestone:
Component: editor Version: 0.15
Keywords: Cc:


wxNotebook/wxAuiNotebook are almost but apparently not fully compatible: There is no equivalent to wxNotebook::ChangeSelection in !wxAuiNotebook (at least up to wxWidgets 2.8.9).
One can use wxAuiNotebook::SetSelection but unlike wxNotebook::ChangeSelection this will generate a page change event.
I don't know if that might be a problem but since using ChangeSelection definitely _is_ a problem the following change seems unavoidable:

Index: lib/Padre/Wx/
--- lib/Padre/Wx/  (Revision 693)
+++ lib/Padre/Wx/  (Arbeitskopie)
@@ -1159,7 +1183,7 @@
        my ($self, $id) = @_;
        my $page = $self->{notebook}->GetPage($id);
        if ($page) {
-          $self->{notebook}->ChangeSelection($id);
+          $self->{notebook}->SetSelection($id);
           return 1;

Change History (1)

comment:1 Changed 12 years ago by szabgab

  • Resolution set to fixed
  • Status changed from new to closed

applied, thanks
so Padre now won't crash when trying to open a file that was already opened.

Note: See TracTickets for help on using tickets.