Skip to content

Commit bd2539f

Browse files
committed
Got OnePass() to be called reliably when user presses ENTER or TAB, and removed unneeded code changes put into JumpForward() in the last two days. Retranslation made and removed without any error. Test project was not a KBserver sharing one.
1 parent c448240 commit bd2539f

File tree

2 files changed

+65
-187
lines changed

2 files changed

+65
-187
lines changed

source/MainFrm.cpp

+34-118
Original file line numberDiff line numberDiff line change
@@ -4826,101 +4826,55 @@ void CMainFrame::OnIdle(wxIdleEvent& event)
48264826
wxDateTime dt1 = wxDateTime::Now(),
48274827
dt2 = wxDateTime::UNow();
48284828
#endif
4829-
// BEW 11Jun22, test for advancement of the phrasebox; first time, oldSN will be -1, and curSN will be
4830-
// a valid sequ num, for box location; but the two being unequal gives a correct bHasAdvanced value.
4831-
// After that, oldSN will be set, and curSN will be at the later location - next pile or further on
4832-
// wherever a hole stops the box, and the test for equality will fail, and so an extra idleEvent will
4833-
// get requested below. But when the user has typed a new adaptation and hits Enter key, OnePass()
4834-
// will get that new value into the entry table of kbserver in a new row, as wxExecute() will have
4835-
// been called. The requested extra idleEvent will cause an immediate re-entry to line 4791 above,
4836-
// and we don't want that reentry to initiate a bogus (2nd) StoreText() done with the existing contents
4837-
// of the create_entry.dat file. So we have to do the following at this reentry situation:
4838-
// (a) compare oldSN and curSN - they will be identical because no advancement of the box has had
4839-
// a chance to happen. So that sets bHasAdvanced to FALSE.
4840-
// (b) the FALSE value for bHasAdvanced can then be used to do:
4841-
// (i) Skip over the OnePass() call, and
4842-
// (ii) Skip over the request for an extra idleEvent - thereby killing the re-entrance issue
4843-
// (iii) Halting the sequence of auto-insertions, thereby giving the user the opportunity to
4844-
// type something at the next hole, and, in CallExecute() for do_create_entry.py or .exe, allows the
4845-
// program counter to progress in the normal way, to complete the create_entry block of the switch
4846-
//
4847-
// BEW 3Aug22 added support to prevent call of OnePass() when the phrasebox is in a fixed location
4848-
// temporarily because a kbserver function (in CallExecute()) is being called and which does not
4849-
// involve relocating the phrasebox to some other location. The need for this was because
4850-
// do_pseudo_undelete.py was causing a bogus duplicate entry to be created in the entry table
4851-
// because OnIdle() fired and, without a test to make it's call of OnePass() be skipped, a duplicate
4852-
// entry resulted. Hmm, this logic addition blocks Enter from allowing movement forward - so too
4853-
// strong. Remove
4854-
//bool bStationaryBox = StationaryPhraseBox();
48554829

48564830
// These next lines apply for the comments above prior to the 3Aug22 addition
4857-
bool bHasAdvanced = TRUE; // initialise
4831+
//bool bHasAdvanced = TRUE; // initialise BEW commented out at Bill's suggestion, email 19Mar24 12:02pm
48584832
int oldSN = pApp->m_nOldSequNum;
48594833
int curSN = pApp->m_nActiveSequNum;
4860-
// whm 5Oct2023 Note: The following test is still too weak for proper operation of the
4861-
// phrasebox. For example, when an operation like "Remove A Retranslation" has just
4862-
// completed, the phrasebox may not have advanced from its position and oldSN and currSN
4863-
// may still be the same making bHasAdvanced FALSE, and if so, the user cannot advance
4864-
// the phrasebox by pressing Enter.
4865-
// IMO here in the OnIdle() handler is not a good place to try to make such as restriction
4866-
// against the OnePass() function getting executed whenever >m_bAutoInsert is TRUE.
4867-
// As a temporary solution, I'm inicluding the if (gpApp->m_bIsKBServerProject || gpApp->m_bIsGlossingKBServerProject)
4868-
// tests along with the curSN == oldSN test below to prevent the code here from interferring
4869-
// with the Enter key press functionality.
4870-
//if (curSN == oldSN)
4871-
if (curSN == oldSN && (gpApp->m_bIsKBServerProject || gpApp->m_bIsGlossingKBServerProject))
4872-
{
4873-
bHasAdvanced = FALSE;
4874-
}
4875-
#if defined (_DEBUG)
4876-
wxLogDebug(_T("OnIdle() line %d, oldSN = %d , curSN = %d, bHasAdvanced = %d\n"), __LINE__,
4877-
oldSN, curSN, (int)bHasAdvanced);
4878-
#endif
4879-
// Testing do_create_entry.py or .exe by running the app (in _DEBUG mode) resulted in a re-entrancy
4880-
// loop which, if not stopped, would cause and infinite loop of calls of OnePass() until the
4881-
// app crashes due to stack overflow. So I've prevented this using oldSN and curSN as above
4882-
//if ((bHasAdvanced == TRUE) && !bStationaryBox)
4883-
if (bHasAdvanced == TRUE)
4884-
{
4885-
CAdapt_ItApp* pApp = &wxGetApp(); pApp = pApp; // avoid warning in Release mode
4886-
CSourcePhrase* pSrcPhrase = NULL; pSrcPhrase = pSrcPhrase; // avoid warning in Release mode
4834+
4835+
bool bIsKBSvrAdaptProj = gpApp->m_bIsKBServerProject;
4836+
bool bIsKBSvGlossProj = gpApp->m_bIsGlossingKBServerProject;
4837+
4838+
// BEW 19Mar24 removed the constraining test here, which uses bHasAdvanced, at Bill's request
4839+
// and to retest to see if reentrancy problems arise from the today's changes
4840+
CAdapt_ItApp* pApp = &wxGetApp(); pApp = pApp; // avoid warning in Release mode
4841+
CSourcePhrase* pSrcPhrase = NULL; pSrcPhrase = pSrcPhrase; // avoid warning in Release mode
48874842
#if defined(_DEBUG) //&& defined(FLAGS)
4888-
{
4889-
if (pApp->m_pActivePile != NULL)
4843+
{
4844+
if (pApp->m_pActivePile != NULL)
4845+
{
4846+
pSrcPhrase = pApp->m_pActivePile->GetSrcPhrase();
4847+
if (pSrcPhrase->m_nSequNumber >= 12)
48904848
{
4891-
pSrcPhrase = pApp->m_pActivePile->GetSrcPhrase();
4892-
if (pSrcPhrase->m_nSequNumber >= 12)
4893-
{
4894-
wxLogDebug(_T("\nOnIdle(), line %d, sn=%d, m_key= %s, m_bAbandonable %d, m_bRetainBoxContents %d, m_bUserTypedSomething %d, bHasAdvanced= [%d], m_bAutoInsert %d OnePass() NEXT"),
4895-
__LINE__, pSrcPhrase->m_nSequNumber, pSrcPhrase->m_key.c_str(), (int)pApp->m_pTargetBox->m_bAbandonable, (int)pApp->m_pTargetBox->m_bRetainBoxContents,
4896-
(int)pApp->m_bUserTypedSomething, (int)bHasAdvanced, (int)pApp->m_bAutoInsert);
4897-
}
4849+
wxLogDebug(_T("\nOnIdle(), line %d, sn=%d, m_key= %s, m_bAbandonable %d, m_bRetainBoxContents %d, m_bUserTypedSomething %d, m_bAutoInsert %d, bIsKBSvrAdaptProj %d, bIsKBSvGlossProj %d, OnePass() NEXT"),
4850+
__LINE__, pSrcPhrase->m_nSequNumber, pSrcPhrase->m_key.c_str(), (int)pApp->m_pTargetBox->m_bAbandonable, (int)pApp->m_pTargetBox->m_bRetainBoxContents,
4851+
(int)pApp->m_bUserTypedSomething, (int)pApp->m_bAutoInsert, (int)bIsKBSvrAdaptProj, (int)bIsKBSvGlossProj);
48984852
}
48994853
}
4854+
}
49004855
#endif
4901-
// Do the call, but skip this block if the phrasebox has not advanced
4902-
bSuccessfulInsertAndMove = pBox->OnePass(pView); // whm note: This is
4856+
// Do the call, but skip this block if the phrasebox has not advanced
4857+
bSuccessfulInsertAndMove = pBox->OnePass(pView); // whm note: This is
49034858
// the only place OnePass() is called
49044859
#if defined (_DEBUG)
4905-
if (bSuccessfulInsertAndMove)
4860+
if (bSuccessfulInsertAndMove)
4861+
{
4862+
pSrcPhrase = pApp->m_pActivePile->GetSrcPhrase();
4863+
if (pSrcPhrase->m_nSequNumber >= 12)
49064864
{
4907-
pSrcPhrase = pApp->m_pActivePile->GetSrcPhrase();
4908-
if (pSrcPhrase->m_nSequNumber >= 12)
4909-
{
4910-
wxLogDebug(_T("%s::%s(), line %d, sn=%d, m_key= [%s], m_targetStr= [%s], m_bAutoInsert %d OnePass() JUST HAPPENED"),
4911-
__FILE__, __FUNCTION__, __LINE__, pSrcPhrase->m_nSequNumber, pSrcPhrase->m_key.c_str(), pSrcPhrase->m_targetStr.c_str(),
4912-
(int)pApp->m_bAutoInsert);
4913-
}
4865+
wxLogDebug(_T("OnIdle(), line %d, sn=%d, m_key= [%s], m_targetStr= [%s], m_bAutoInsert %d, bIsKBSvrAdaptProj %d, bIsKBSvGlossProj %d, OnePass() JUST HAPPENED"),
4866+
__LINE__, pSrcPhrase->m_nSequNumber, pSrcPhrase->m_key.c_str(), pSrcPhrase->m_targetStr.c_str(),
4867+
(int)pApp->m_bAutoInsert, (int)pApp->m_bAutoInsert, (int)bIsKBSvrAdaptProj, (int)bIsKBSvGlossProj);
49144868
}
4915-
#endif
49164869
}
4870+
#endif
49174871

49184872
// don't slow things down unless we need to investigate
49194873
#ifdef SHOW_ONEPASS_BENCHMARKS
4920-
dt1 = dt2;
4921-
dt2 = wxDateTime::UNow();
4922-
wxLogDebug(_T("********In OnIdle() OnePass() executed in %s ms"),
4923-
(dt2 - dt1).Format(_T("%l")).c_str());
4874+
dt1 = dt2;
4875+
dt2 = wxDateTime::UNow();
4876+
wxLogDebug(_T("********In OnIdle() OnePass() executed in %s ms"),
4877+
(dt2 - dt1).Format(_T("%l")).c_str());
49244878
#endif
49254879

49264880
// whm added 20Nov10 reset the m_bIsGuess flag below. Can't do it in PlaceBox()
@@ -4930,53 +4884,16 @@ void CMainFrame::OnIdle(wxIdleEvent& event)
49304884
pApp->m_bIsGuess = FALSE;
49314885
if (bSuccessfulInsertAndMove)
49324886
{
4933-
// enable next iteration, but not when so-enabling would result in an infinite loop of reentrancy
4934-
if (bHasAdvanced)
4935-
{
4936-
// If StoreText has done a CallExecute() for the create_entry enum block, then
4937-
// the user must have made a new translation - which can only be done while the
4938-
// phrasebox was halted, and in that circumstance, immediately requesting a new
4939-
// idleEvent be posted, as here, would cause immediate re-entrancy and calling
4940-
// of OnPass() again wrongly, which would lead to an unending loop until the
4941-
// app crashs due to stack overflow. Disallowing RequestMore() when the box
4942-
// has not advanced, kills the reentrancy problem
49434887
event.RequestMore(); // Bill added
4944-
}
4945-
else
4946-
{
4947-
// BEW 11Jun22, the phrasebox has not advanced, so bring the
4948-
// box to a halt, but continue to enable OnIdle calls
4949-
pApp->m_bAutoInsert = FALSE;
4950-
}
49514888
}
49524889
else
49534890
{
4954-
// halt iterations, we did not make a match or could not move forward,
4891+
// halt iterations, we did not succeed or could not move forward,
49554892
// but continue to enable OnIdle calls
49564893
pApp->m_bAutoInsert = FALSE;
4894+
event.RequestMore(); // BEW added, 19Mar24
49574895
}
49584896

4959-
// BEW 28/jul23, when moving forward to pNewPile returns NULL, we've probably reached
4960-
// unexpected doc end, so perhaps returning here when bSuccessfulInsertAndMove is
4961-
// FALSE might be helpful - as the calls further down will certainly fail in this circumstance
4962-
// ? No, I'm scared, maybe the bool can be false for other scenarios which don't destroy the app, I'll comment it out for a few levels
4963-
//if (!bSuccessfulInsertAndMove)
4964-
//{
4965-
// return;
4966-
//}
4967-
/* #if defined(_DEBUG) && defined(FLAGS)
4968-
{
4969-
CAdapt_ItApp* pApp = &wxGetApp();
4970-
CSourcePhrase* pSrcPhrase = NULL;
4971-
if (pApp->m_pActivePile != NULL)
4972-
{
4973-
pSrcPhrase = pApp->m_pActivePile->GetSrcPhrase();
4974-
wxLogDebug(_T("\n%s::%s(), line %d, sn=%d, m_key= %s, m_bAbandonable %d, m_bRetainBoxContents %d, m_bUserTypedSomething %d, m_bBoxTextByCopyOnly %d, m_bAutoInsert %d"),
4975-
__FILE__, __FUNCTION__, __LINE__, pSrcPhrase->m_nSequNumber, pSrcPhrase->m_key.c_str(), (int)pApp->m_pTargetBox->m_bAbandonable, (int)pApp->m_pTargetBox->m_bRetainBoxContents,
4976-
(int)pApp->m_bUserTypedSomething, (int)pApp->m_pTargetBox->m_bBoxTextByCopyOnly, (int)pApp->m_bAutoInsert);
4977-
}
4978-
}
4979-
#endif */
49804897
} // end of TRUE block for test: if (pApp->m_bAutoInsert)
49814898
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
49824899
// whm added 10Jan2018 to support quick selection of a translation equivalent.
@@ -5055,7 +4972,6 @@ void CMainFrame::OnIdle(wxIdleEvent& event)
50554972
//#endif
50564973
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
50574974

5058-
50594975
// BEW 2Dec2014 Alan Buseman's Guesser - support for hiding the GuesserUpdate() calls
50604976
// which need to be done pretty often -- and which block the GUI whether done synchronously
50614977
// as is done here, or asynchronously on a thread (due to mutexes blocking KB saves and

source/PhraseBox.cpp

+31-69
Original file line numberDiff line numberDiff line change
@@ -3359,8 +3359,8 @@ bool CPhraseBox::LookAhead(CPile* pNewPile)
33593359

33603360
// BEW 13Apr10, no changes needed for support of doc version 5
33613361
// BEW 8July10, no changes needed for support of kbVersion 2
3362-
// BEW 18Mar24, JumpForward() is called from within OnePass(), OnSysKeyUp(), OnKeyUp() and in the
3363-
// OnOK() function of Preferences... for the Punctuation Correspondences Page.
3362+
// BEW 18Mar24, JumpForward() is called from within OnePass() but only in transliteration mode,
3363+
// OnSysKeyUp(), OnKeyUp() and in the OnOK() function of Preferences... for the Punctuation Correspondences Page.
33643364
// I needed to refactor JumpForward() because the auto-insert mode, which accepts Enter or Tab for
33653365
// jumping to next 'hole', did not have a call of MoveToNextPile() to cause the foward movement
33663366
// to happen. Fixed that. Now appears to work right. The error was discovered when I came to a
@@ -3637,56 +3637,12 @@ void CPhraseBox::JumpForward(CAdapt_ItView* pView)
36373637
} // end of block for test for m_bSingleStep == TRUE
36383638
else // auto-inserting
36393639
{
3640-
3641-
//*
3642-
// BEW 18Mar24, Bill is convinced that this block of code (to the //*/ line) is not needed.
3643-
// On his machine, which does not have a MariaDB installation, Enter works just fine for a
3644-
// merger followed by Enter keypress. On my machine (M90T), the box is paralysed - does not advance.
3645-
// I've made multiple tests, including nyindrou data, no kb sharing set up on project, MariaDB not
3646-
// running, and every time the box at Enter press, it does not move - whether project is a kb sharing one,
3647-
// or not, if this following block of code is commented out. So I'm keeping the code as is. It works.
3648-
// I can't afford to spend more time on the issue, especially as I've no realistic way to compare the
3649-
// workings of my computer versus Bill's.
3650-
36513640
// cause auto-inserting using the OnIdle handler to commence
36523641
pApp->m_bAutoInsert = TRUE;
3653-
if (pApp->m_pTargetBox->m_bAbandonable)
3654-
{
3655-
pApp->m_pTargetBox->m_bAbandonable = FALSE; // yep, checking and resetting
3656-
//FALSE here releaves the user of responsibility
3657-
// to make the content 'stick' by first doing something, eg. a click, in the box
3658-
// before using ENTER key or TAB key to cause an advance to a hole
3659-
}
3660-
// User has pressed the Enter key (OnChar() calls JumpForward())
3661-
// BEW changed 9Apr12, to support discontinuous highlighting
3662-
// spans for auto-insertions...
3663-
// Since OnIdle() will call OnePass() and the latter will call
3664-
// MoveToNextPile(), and it is in MoveToNextPile() that CCell's
3665-
// m_bAutoInserted flag can get set TRUE, we only here need to ensure that the
3666-
// current location is a kick-off one, which we can do by clearing any earlier
3667-
// highlighting currently in effect
3668-
pLayout->ClearAutoInsertionsHighlighting();
3669-
3670-
pLayout->m_pDoc->ResetPartnerPileWidth(pApp->m_pActivePile->GetSrcPhrase());
3671-
int bSuccessful;
3672-
bSuccessful = MoveToNextPile(pApp->m_pActivePile);
3673-
3674-
pLayout->m_docEditOperationType = relocate_box_op;
3675-
#ifdef _NEW_LAYOUT
3676-
pLayout->RecalcLayout(pApp->m_pSourcePhrases, keep_strips_keep_piles);
3677-
#else
3678-
pLayout->RecalcLayout(pApp->m_pSourcePhrases, create_strips_keep_piles);
3642+
#if defined(_DEBUG)
3643+
wxLogDebug(_T("10. JumpForward() line %d , pApp->m_bAutoInsert = TRUE has just been set"), __LINE__);
36793644
#endif
3680-
pApp->m_pActivePile = pView->GetPile(pApp->m_nActiveSequNum);
3681-
wxASSERT(pApp->m_pActivePile != NULL);
3682-
CSourcePhrase* pSPhr = pApp->m_pActivePile->GetSrcPhrase();
3683-
pLayout->m_pDoc->ResetPartnerPileWidth(pSPhr);
3684-
3685-
pLayout->m_pCanvas->ScrollIntoView(pApp->m_nActiveSequNum);
36863645

3687-
pLayout->PlaceBox();
3688-
pView->Invalidate();
3689-
//*/
36903646
} // end of else block for test for m_bSingleStep == TRUE, i.e. autoinserting
36913647

36923648
// save the phrase box's text, in case user hits SHIFT+End to unmerge a
@@ -3889,11 +3845,11 @@ void CPhraseBox::JumpForward(CAdapt_ItView* pView)
38893845

38903846
#ifdef _NEW_LAYOUT
38913847
#ifdef _FIND_DELAY
3892-
wxLogDebug(_T("10. Start of RecalcLayout in JumpForward"));
3848+
wxLogDebug(_T("11. Start of RecalcLayout in JumpForward"));
38933849
#endif
38943850
pLayout->RecalcLayout(pApp->m_pSourcePhrases, keep_strips_keep_piles);
38953851
#ifdef _FIND_DELAY
3896-
wxLogDebug(_T("11. End of RecalcLayout in JumpForward"));
3852+
wxLogDebug(_T("12. End of RecalcLayout in JumpForward"));
38973853
#endif
38983854
#else
38993855
pLayout->RecalcLayout(pApp->m_pSourcePhrases, create_strips_keep_piles);
@@ -3906,9 +3862,9 @@ void CPhraseBox::JumpForward(CAdapt_ItView* pView)
39063862
pView->Invalidate();
39073863
pLayout->PlaceBox();
39083864
} // end Review mode (single src phrase move) block
3909-
#ifdef _FIND_DELAY
3910-
wxLogDebug(_T("12. End of JumpForward"));
3911-
#endif
3865+
//#ifdef _FIND_DELAY
3866+
wxLogDebug(_T("13. End of JumpForward(pView), returning now"));
3867+
//#endif
39123868
}
39133869

39143870
// This function is called for every character typed in phrase box (via OnChar() function
@@ -6236,9 +6192,9 @@ void CPhraseBox::OnSysKeyUp(wxKeyEvent& event)
62366192

62376193
bool CPhraseBox::OnePass(CAdapt_ItView *pView)
62386194
{
6239-
#ifdef _FIND_DELAY
6240-
wxLogDebug(_T("1. Start of OnePass"));
6241-
#endif
6195+
//#ifdef _FIND_DELAY
6196+
wxLogDebug(_T("1. Start of OnePass(pView)"));
6197+
//#endif
62426198
CAdapt_ItApp* pApp = &wxGetApp();
62436199
wxASSERT(pApp != NULL);
62446200
CAdapt_ItDoc* pDoc = pApp->GetDocument();
@@ -6338,18 +6294,18 @@ bool CPhraseBox::OnePass(CAdapt_ItView *pView)
63386294
}
63396295
else
63406296
{
6341-
#ifdef _FIND_DELAY
6342-
wxLogDebug(_T("2. Before MoveToNextPile"));
6343-
#endif
6297+
//#ifdef _FIND_DELAY
6298+
wxLogDebug(_T("2. OnePass(), Before MoveToNextPile() is to be called"));
6299+
//#endif
63446300
bSuccessful = MoveToNextPile(pApp->m_pActivePile);
63456301
// BEW 28Jul23, nah, too dangerous - there's "not successful" code blocks below which may be workable
63466302
//if (!bSuccessful) // BEW added 28Jul23
63476303
//{
63486304
// return FALSE; // retuns to MainFrm.cpp
63496305
//}
6350-
#ifdef _FIND_DELAY
6351-
wxLogDebug(_T("3. After MoveToNextPile"));
6352-
#endif
6306+
//#ifdef _FIND_DELAY
6307+
wxLogDebug(_T("3. OnePass() After MoveToNextPile() has advanced phrasebox forward"));
6308+
//#endif
63536309
// If in vertical edit mode, and the phrasebox has come to a hole, then we
63546310
// want to halt OnePass() calls in OnIdle() so that the user gets the chance
63556311
// to adapt at the hole
@@ -6407,7 +6363,7 @@ bool CPhraseBox::OnePass(CAdapt_ItView *pView)
64076363
// YES!! That works - the highlighting is now visible when the box has
64086364
// disappeared and the end of doc message shows. Also, normal adapting still
64096365
// works right despite this change, so that's a bug (or undesireable feature -
6410-
// namely, the loss of highlighting when the doc is reached by auto-inserting)
6366+
// namely, the loss of highlighting when the doc end is reached by auto-inserting)
64116367
// now fixed.
64126368

64136369
pLayout->Redraw(); // bFirstClear is default TRUE
@@ -6489,9 +6445,9 @@ bool CPhraseBox::OnePass(CAdapt_ItView *pView)
64896445
pLayout->m_docEditOperationType = relocate_box_op;
64906446
pView->Invalidate(); // added 1Apr09, since we return at next line
64916447
pLayout->PlaceBox();
6492-
#ifdef _FIND_DELAY
6493-
wxLogDebug(_T("8. End of OnePass"));
6494-
#endif
6448+
//#ifdef _FIND_DELAY
6449+
wxLogDebug(_T("8. End of OnePass(pView)"));
6450+
//#endif
64956451

64966452
pApp->m_bUserDlgOrMessageRequested = FALSE;
64976453
pApp->m_bUserHitEnterOrTab = FALSE;
@@ -6841,11 +6797,17 @@ void CPhraseBox::OnKeyUp(wxKeyEvent& event)
68416797
// a placeholder, Choose Translation, Guesser dialog, and maybe others (but not all).
68426798
// Whether in Drafting or Reviewing mode, without the protection below, then an Enter
68436799
// or Tab key press would cause run-on the next hole, or next pile, respectively.
6844-
6845-
// Normal jump is okay to do
6800+
#if defined (_DEBUG)
6801+
wxLogDebug(_T("OnKeyUp() in PhraseBox.cpp, line %d, JumpForward() called on next line, then return"), __LINE__);
6802+
#endif
6803+
// Normal jump is okay to do - I restored the line pApp->m_bAutoInsert = TRUE; at the else block where
6804+
// it's not m_bSingleStep TRUE; we want OnIdle to trigger a call of OnePass() instead of doing something in
6805+
// JumpForward(). This call will complete and set m_bAutoInsert before OnIdle has a chance to trigger an
6806+
// idle event and that's where (via it's handler) OnePass() gets the chance to be called, responding to
6807+
// the user's ENTER or TAB keypress
68466808
JumpForward(pView);
68476809
return;
6848-
}
6810+
} // end of TRUE block for test: if keycode is TAB or Enter etc.
68496811

68506812
// version 1.4.2 and onwards, we want a right or left arrow used to remove the
68516813
// phrasebox's selection to be considered a typed character, so that if a subsequent

0 commit comments

Comments
 (0)