View Issue Details

IDProjectCategoryView StatusLast Update
0025472LazarusDatabasepublic2014-09-22 00:54
ReporterErwin van den BoschAssigned ToJesus Reyes 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.3 (SVN)Product Build 
Target Version1.4Fixed in Version1.3 (SVN) 
Summary0025472: Better fix for issue 0022916 - DBEdit ESC behaviour
DescriptionI'am not 100% happy with the fix in dbedit.inc revision 38836 in SVN trunk. It's about the handling of the ESC key. The ESC key should reverse any changes made by the user in the tdbedit control. After reversing changes the ESC key should be handled (so assign Key := VK_UNKNOWN)

But the user can only made changes when the dataset is in edit mode. So when not in edit mode the FDataLink.Reset; is not needed and the assign Key := VK_UNKNOWN is not needed too.

I include a patch that I think is a better fix.
TagsNo tags attached.
Fixed in Revision46281
LazTarget1.4
Widgetset
Attached Files
  • dbedit.inc.patch (612 bytes)
    Index: lcl/include/dbedit.inc
    ===================================================================
    --- lcl/include/dbedit.inc	(revision 43615)
    +++ lcl/include/dbedit.inc	(working copy)
    @@ -112,9 +112,12 @@
       case key of
         VK_ESCAPE:
           begin
    -       //cancel out of editing by reset on esc
    -       FDataLink.Reset;
    -       SelectAll;
    +        //cancel out of editing by reset on esc, but only when in editing mode
    +        if FDataLink.Editing then begin
    +          FDataLink.Reset;
    +          SelectAll;
    +          Key := VK_UNKNOWN;
    +        end; 
           end;
         VK_DELETE, VK_BACK:
           begin
    
    dbedit.inc.patch (612 bytes)

Relationships

related to 0022916 resolvedLuiz Americo DBEdit prevents Esc from activating a Cancel button 

Activities

Erwin van den Bosch

2013-12-30 23:41

reporter  

dbedit.inc.patch (612 bytes)
Index: lcl/include/dbedit.inc
===================================================================
--- lcl/include/dbedit.inc	(revision 43615)
+++ lcl/include/dbedit.inc	(working copy)
@@ -112,9 +112,12 @@
   case key of
     VK_ESCAPE:
       begin
-       //cancel out of editing by reset on esc
-       FDataLink.Reset;
-       SelectAll;
+        //cancel out of editing by reset on esc, but only when in editing mode
+        if FDataLink.Editing then begin
+          FDataLink.Reset;
+          SelectAll;
+          Key := VK_UNKNOWN;
+        end; 
       end;
     VK_DELETE, VK_BACK:
       begin
dbedit.inc.patch (612 bytes)

Erwin van den Bosch

2013-12-30 23:56

reporter   ~0072118

After looking in dbmemo.inc I think the same changes should be made in that control too.

Juha Manninen

2014-09-21 10:45

developer   ~0077477

Last edited: 2014-09-21 10:46

View 2 revisions

There is a patch. I assigned to Jesus Reyes because I am not sure if Luiz Americo follows this actively now.

Jesus Reyes

2014-09-22 00:54

developer   ~0077511

Applied, thanks.

Issue History

Date Modified Username Field Change
2013-12-30 23:41 Erwin van den Bosch New Issue
2013-12-30 23:41 Erwin van den Bosch File Added: dbedit.inc.patch
2013-12-30 23:56 Erwin van den Bosch Note Added: 0072118
2014-01-02 19:11 Juha Manninen Relationship added related to 0022916
2014-09-21 10:42 Juha Manninen Assigned To => Jesus Reyes
2014-09-21 10:42 Juha Manninen Status new => assigned
2014-09-21 10:45 Juha Manninen Note Added: 0077477
2014-09-21 10:46 Juha Manninen Note Edited: 0077477 View Revisions
2014-09-22 00:54 Jesus Reyes Fixed in Revision => 46281
2014-09-22 00:54 Jesus Reyes LazTarget => 1.4
2014-09-22 00:54 Jesus Reyes Note Added: 0077511
2014-09-22 00:54 Jesus Reyes Status assigned => resolved
2014-09-22 00:54 Jesus Reyes Fixed in Version => 1.3 (SVN)
2014-09-22 00:54 Jesus Reyes Resolution open => fixed
2014-09-22 00:54 Jesus Reyes Target Version => 1.4