Restore old behaviour of the Edit Grid where <return> moves to the next column, but...
authordpage <dpage@a7884b65-44f6-0310-8a51-81a127f17b15>
Thu, 8 Jan 2009 13:35:14 +0000 (13:35 +0000)
committerdpage <dpage@a7884b65-44f6-0310-8a51-81a127f17b15>
Thu, 8 Jan 2009 13:35:14 +0000 (13:35 +0000)
git-svn-id: svn://svn.pgadmin.org/trunk/pgadmin3@7542 a7884b65-44f6-0310-8a51-81a127f17b15

CHANGELOG
pgadmin/frm/frmEditGrid.cpp

index cccac07aafee2936308f8eadd00f5cd3c175fcfe..b65a64e9281dbce7f8a939b0458f96a078b125c0 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -36,9 +36,12 @@ Changes
 \r
 Date       Dev Ver    Change details\r
 ---------- --- -----  --------------\r
-2008-01-07 DP  1.9.0  Add support for direct debugging of functions with\r
+2009-01-08 DP  1.9.0  Restore old behaviour of the Edit Grid where <return>\r
+                      moves to the next column, but <enter> moves to the next\r
+                      row rather than both changing column [mei ben]\r
+2009-01-07 DP  1.9.0  Add support for direct debugging of functions with\r
                       variadic parameters.\r
-2008-01-05 GL  1.9.0  Add -S and -Sc command line options to open a server\r
+2009-01-05 GL  1.9.0  Add -S and -Sc command line options to open a server\r
                       status window\r
 2009-01-01 DP  1.9.0  Add support for the many new node types in Postgres 8.4\r
                       [Ashesh Vashi]\r
index aaa15acac7f40e4510bc5a0a67f427ba2768e558..ba64c2904cab11cecb17df6853ceb8c0773b3eaa 100644 (file)
@@ -811,20 +811,27 @@ void frmEditGrid::OnKey(wxKeyEvent &event)
             }
             else
             {
-                if (curcol == sqlGrid->GetNumberCols()-1)
+                if( keycode!=WXK_NUMPAD_ENTER )
                 {
-                    curcol=0;
-                    currow++;
-                    // locate first editable column
-                    while (sqlGrid->IsReadOnly(currow, curcol) && curcol < sqlGrid->GetNumberCols())
-                        curcol++;
-                    // next line is completely read-only
-                    if (curcol == sqlGrid->GetNumberCols())
-                        return;
+                    if (curcol == sqlGrid->GetNumberCols()-1)
+                    {
+                        curcol=0;
+                        currow++;
+                        // locate first editable column
+                        while (sqlGrid->IsReadOnly(currow, curcol) && curcol < sqlGrid->GetNumberCols())
+                            curcol++;
+                        // next line is completely read-only
+                        if (curcol == sqlGrid->GetNumberCols())
+                            return;
 
+                    }
+                    else
+                        curcol++;
+                }
+                else // ( keycode==WXK_NUMPAD_ENTER )
+                {
+                    currow++;
                 }
-                else
-                    curcol++;
 
                 OnSave(ev);
                 sqlGrid->SetGridCursor(currow, curcol);