OSDN Git Service

MyListCtrl now destroy internal editText every time (not sure whether this is a good...
authortoshinagata1964 <toshinagata1964@a2be9bc6-48de-4e38-9406-05402d4bc13c>
Fri, 5 Nov 2021 00:29:11 +0000 (00:29 +0000)
committertoshinagata1964 <toshinagata1964@a2be9bc6-48de-4e38-9406-05402d4bc13c>
Fri, 5 Nov 2021 00:29:11 +0000 (00:29 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/molby/trunk@631 a2be9bc6-48de-4e38-9406-05402d4bc13c

wxSources/MyListCtrl.cpp

index 96a0922..25d6254 100644 (file)
@@ -409,12 +409,18 @@ MyListCtrl::EndEditTextAndRestart(bool setValueFlag, int newRow, int newColumn)
                        Refresh();
                }
 #endif
-               //  Temporarily hide until new editing starts
+        
+        //  Should we destroy editText every time?
+        //  (It would be safer anyway)
+        editText->Destroy();
+        editText = NULL;
+    
+        //  Temporarily hide until new editing starts
                //  (editText is set to NULL to avoid recursive calling of EndEditText())
-               wxTextCtrl *saveEditText = editText;
-               editText = NULL;
-               saveEditText->Hide();
-               editText = saveEditText;
+               //wxTextCtrl *saveEditText = editText;
+               //editText = NULL;
+               //saveEditText->Hide();
+               //editText = saveEditText;
                
                if (setValueFlag && dataSource)
                        dataSource->SetItemText(this, editRow, editColumn, sval);