mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 10:19:23 +02:00
Gtk2: fixed bug where combobox returned caret position for selection length. issue #19081
git-svn-id: trunk@30185 -
This commit is contained in:
parent
b92bfd76d2
commit
ecc941f2f6
@ -1609,9 +1609,10 @@ begin
|
||||
|
||||
// if the combo is an editable ...
|
||||
Entry := GetComboBoxEntry(WidgetInfo^.CoreWidget);
|
||||
if Entry<>nil then begin
|
||||
if gtk_editable_get_selection_bounds(PGtkEditable(Entry), @AStart, @AEnd) = False then
|
||||
Exit(gtk_editable_get_position(PGtkEditable(Entry)));
|
||||
if Entry<>nil then
|
||||
begin
|
||||
if not gtk_editable_get_selection_bounds(PGtkEditable(Entry), @AStart, @AEnd) then
|
||||
Exit(0);
|
||||
Result := ABS(AStart - AEnd);
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user