Ticket #390: 390-submersible.patch
| File 390-submersible.patch, 1.4 KB (added by submersible_toaster, 3 years ago) |
|---|
-
lib/Padre/Wx/Editor.pm
869 869 my $text = $self->GetSelectedText; 870 870 if ( Padre::Constant::WXGTK and defined $text and $text ne '' ) { 871 871 872 # Only on X11 based platforms 873 # Wx::wxTheClipboard->UsePrimarySelection(1); 874 $self->put_text_to_clipboard($text); 875 876 # Wx::wxTheClipboard->UsePrimarySelection(0); 872 # Only on X11 based platforms 873 #Wx::wxTheClipboard->Open; 874 #Wx::wxTheClipboard->UsePrimarySelection(1); 875 876 #$self->put_text_to_clipboard($text); 877 #Wx::wxTheClipboard->UsePrimarySelection(0); 878 #Wx::wxTheClipboard->Close(); 877 879 } 878 880 879 881 my $doc = $self->{Document}; … … 892 894 # It seems that another event is doing something but not within this module. 893 895 # Please look at ticket #390 for details! 894 896 895 Padre::Current->editor->Paste; 896 897 Wx::wxTheClipboard->Open; 898 Wx::wxTheClipboard->UsePrimarySelection(1); 899 my $wm_clip = Wx::TextDataObject->new; 900 Wx::wxTheClipboard->GetData($wm_clip); 901 Padre::Current->editor->ReplaceSelection($wm_clip->GetText); 902 Wx::wxTheClipboard->UsePrimarySelection(0); 903 Wx::wxTheClipboard->Close; 904 897 905 my $doc = $self->{Document}; 898 906 if ( $doc->can('event_on_middle_up') ) { 899 907 $doc->event_on_middle_up( $self, $event ); 900 908 } 901 909 902 $event->Skip;910 #$event->Skip; 903 911 return; 904 912 } 905 913
