mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 08:09:26 +02:00
LCL-GTK2: Fix errors in TCombobox.Text. Issue #28840, patch by Maxim Ganetsky.
This commit is contained in:
parent
b82cf7de6e
commit
7595beee48
@ -1060,14 +1060,14 @@ begin
|
||||
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
|
||||
gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), p, -1);
|
||||
g_free(p);
|
||||
// Show the text properly when tabbing between controls.
|
||||
gtk_editable_select_region(PGtkEditable(Widget), 0, 0);
|
||||
end;
|
||||
// Copy text to X-clipboard (paste = middle mouse button).
|
||||
p := gtk_editable_get_chars(PGtkEditable(Widget), AStart, AEnd);
|
||||
if AStart <> AEnd then
|
||||
gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), p, -1);
|
||||
g_free(p);
|
||||
// Show the text properly when tabbing between controls.
|
||||
gtk_editable_select_region(PGtkEditable(Widget), 0, 0);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user