eda:gui:TableEditor; CreateRow(); don't attempt adding a new row if table is not...
authorRejean Loyer <rejean.loyer@gmail.com>
Tue, 31 Jul 2012 20:20:30 +0000 (16:20 -0400)
committerJerome St-Louis <jerome@ecere.com>
Tue, 31 Jul 2012 20:36:25 +0000 (16:36 -0400)
eda/libeda/locale/EDA.pot
eda/libeda/src/gui/TableEditor.ec

index aaaa345..57c7df5 100644 (file)
@@ -103,8 +103,8 @@ msgstr "Table Editor"
 msgid "Unable to detect if table exists!\n"
 msgstr "Unable to detect if table exists!\n"
 
-#: ./src/gui/TableEditor.ec:872
-#: ./src/gui/TableEditor.ec:891
+#: ./src/gui/TableEditor.ec:873
+#: ./src/gui/TableEditor.ec:892
 msgid "WordList match cannot be found in database."
 msgstr "WordList match cannot be found in database."
 
index e6044bf..ad59117 100644 (file)
@@ -503,7 +503,7 @@ public:
    {
       DebugLn("TableEditor::CreateRow");
       //list.NotifySelect(this, list, null, 0);
-      if(!modifiedDocument)
+      if(table && editRow && editRow.tbl && !modifiedDocument)
       {
          uint id; // = table.rowsCount + 1; // this is bad with deleted rows, won't work, how to have unique id? 
                                // I think the 3 following comment lines apply to the old sqlite driver before many fix we done for wsms
@@ -541,6 +541,7 @@ public:
             }
             /*if(fldActive)
                r.SetData(fldActive, active);*/
+            selectedId = id;
 
 #ifdef _DEBUG
             newText = PrintString("[", newEntryStringDebug, id, "]");