Molecular Modeling Software
リビジョン | bdca2829295e018c01f645a6b7b33437ccdbdfbc (tree) |
---|---|
日時 | 2014-03-25 09:51:21 |
作者 | toshinagata1964 <toshinagata1964@a2be...> |
コミッター | toshinagata1964 |
Table view on Mac sometimes crashes. Hopefully fixed (I am not sure)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/molby/trunk@507 a2be9bc6-48de-4e38-9406-05402d4bc13c
@@ -397,9 +397,9 @@ MyListCtrl::EndEditTextAndRestart(bool setValueFlag, int newRow, int newColumn) | ||
397 | 397 | if (setValueFlag && dataSource) { |
398 | 398 | sval = editText->GetValue(); |
399 | 399 | } |
400 | - if (wxWindow::FindFocus() == editText) { | |
401 | - SetFocus(); | |
402 | - } | |
400 | + // if (wxWindow::FindFocus() == editText) { | |
401 | + // SetFocus(); | |
402 | + // } | |
403 | 403 | #if defined(__WXMAC__) |
404 | 404 | { |
405 | 405 | /* Erase the focus ring */ |
@@ -409,8 +409,13 @@ MyListCtrl::EndEditTextAndRestart(bool setValueFlag, int newRow, int newColumn) | ||
409 | 409 | Refresh(); |
410 | 410 | } |
411 | 411 | #endif |
412 | - editText->Hide(); /* Temporarily hide until new editing starts */ | |
413 | - | |
412 | + // Temporarily hide until new editing starts | |
413 | + // (editText is set to NULL to avoid recursive calling of EndEditText()) | |
414 | + wxTextCtrl *saveEditText = editText; | |
415 | + editText = NULL; | |
416 | + saveEditText->Hide(); | |
417 | + editText = saveEditText; | |
418 | + | |
414 | 419 | if (setValueFlag && dataSource) |
415 | 420 | dataSource->SetItemText(this, editRow, editColumn, sval); |
416 | 421 |
@@ -420,7 +425,7 @@ MyListCtrl::EndEditTextAndRestart(bool setValueFlag, int newRow, int newColumn) | ||
420 | 425 | StartEditText(newRow, newColumn); |
421 | 426 | } else { |
422 | 427 | editRow = editColumn = -1; |
423 | -#if defined(__WXMAC__) | |
428 | +#if 0 && defined(__WXMAC__) | |
424 | 429 | if (editText != NULL) { |
425 | 430 | editText->Disconnect(wxID_ANY); |
426 | 431 | editText->Destroy(); |