mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 00:58:04 +02:00
LCL-Gtk2: Fixed pasting text from Combobox to some other application when selecting/middle-clicking.
Makes its behavior consistent with TEdit. Also avoids accessing uninitialized variables. Follow-up of:18f1d06255
5f8eacc23d
This commit is contained in:
parent
33868eedbb
commit
7e1d786c38
@ -1053,12 +1053,9 @@ begin
|
||||
Info := GetWidgetInfo(Widget);
|
||||
if Info <> nil then
|
||||
begin
|
||||
if (Info^.LCLObject is TCustomEdit) then
|
||||
begin
|
||||
gtk_editable_get_selection_bounds(PGtkEditable(Widget),@AStart, @AEnd);
|
||||
Info^.CursorPos := Min(AStart, AEnd);
|
||||
Info^.SelLength := Abs(AEnd - AStart);
|
||||
end;
|
||||
gtk_editable_get_selection_bounds(PGtkEditable(Widget),@AStart, @AEnd);
|
||||
Info^.CursorPos := Min(AStart, AEnd);
|
||||
Info^.SelLength := Abs(AEnd - AStart);
|
||||
// Copy text to X-clipboard (paste = middle mouse button).
|
||||
p := gtk_editable_get_chars(PGtkEditable(Widget), AStart, AEnd);
|
||||
if AStart <> AEnd then
|
||||
|
Loading…
Reference in New Issue
Block a user