Skip to content

Commit e7646a0

Browse files
committed
fix: quick filter prompts on numbers break WHERE clause through local formatting
Refs #2488
1 parent a6d6e70 commit e7646a0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

source/main.pas

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7557,6 +7557,7 @@ procedure TMainForm.QuickFilterClick(Sender: TObject);
75577557
Item: TMenuItem;
75587558
Conn: TDBConnection;
75597559
ShiftKeyPressed: Boolean;
7560+
OldDataLocalNumberFormat: Boolean;
75607561
begin
75617562
// Set filter for "where..."-clause
75627563
if (PageControlMain.ActivePage <> tabData) or (DataGrid.FocusedColumn = NoColumn) then
@@ -7579,7 +7580,10 @@ procedure TMainForm.QuickFilterClick(Sender: TObject);
75797580
and (Conn.Parameters.NetTypeGroup = ngPgSQL) then begin
75807581
Col := Col + '::text';
75817582
end;
7583+
OldDataLocalNumberFormat := DataLocalNumberFormat;
7584+
DataLocalNumberFormat := False;
75827585
Val := DataGrid.Text[DataGrid.FocusedNode, DataGrid.FocusedColumn];
7586+
DataLocalNumberFormat := OldDataLocalNumberFormat;
75837587
if InputQuery(_('Specify filter-value...'), Act.Caption, Val) then begin
75847588
if Act = actQuickFilterPrompt1 then
75857589
Filter := Col + ' = ' + Conn.EscapeString(Val, TableCol.DataType)

0 commit comments

Comments
 (0)