diff --git a/Status.15x b/Status.15x index c69b7e072b..7cf34f5ee0 100644 --- a/Status.15x +++ b/Status.15x @@ -172,11 +172,10 @@ EDITING * Create a new document; enter a few chars; press return; from the environments combo box on the top left corner select anything, e.g., 'Part'; - try to enter text => you can't! Even worse: click on the previous paragraph - with mouse to change the focus: lyx crashes. (happens on Win XP SP2, - MSVC 2005 Prof., Scons) + try to enter text => you can't! MG: This must be a GUI problem; when using keyboard shortcuts (Alt-P-...), - the problem does not occur; it does not matter whether the cursor is in the last line + the problem does not occur; it does not matter whether the cursor is in the last line + JSpitzm: The problem is that the workarea doesn't get focus after the combo selection. * Open "de_Intro.lyx"; mark first word ("Einführung"); invoke "ert-insert" => seg fault @@ -545,3 +544,8 @@ CREDITS: of the first misspelled word. FIXED (Georg 2006-12-10). This bug had the same resaon as the previous one. +* Create a new document; enter a few chars; press return; click on the previous paragraph + with mouse to change the focus: lyx crashes. (happens on Win XP SP2, + MSVC 2005 Prof., Scons) + FIXED (JSpitzm 2006-12-11) + diff --git a/src/BufferView.C b/src/BufferView.C index 5749c80252..6da56b3fd5 100644 --- a/src/BufferView.C +++ b/src/BufferView.C @@ -1211,7 +1211,7 @@ void BufferView::setCursor(DocIterator const & dit) } -void BufferView::mouseSetCursor(LCursor & cur) +bool BufferView::mouseSetCursor(LCursor & cur) { BOOST_ASSERT(&cur.bv() == this); @@ -1222,14 +1222,15 @@ void BufferView::mouseSetCursor(LCursor & cur) // do the dEPM magic if needed // FIXME: move this to InsetText::notifyCursorLeaves? + bool update = false; if (!badcursor && cursor_.inTexted()) - cursor_.text()->deleteEmptyParagraphMechanism(cur, cursor_); + update = cursor_.text()->deleteEmptyParagraphMechanism(cur, cursor_); cursor_ = cur; cursor_.clearSelection(); cursor_.setTargetX(); finishUndo(); - + return update; } diff --git a/src/BufferView.h b/src/BufferView.h index 4b69b7968d..43b1c7455a 100644 --- a/src/BufferView.h +++ b/src/BufferView.h @@ -184,7 +184,7 @@ public: void setCursor(DocIterator const &); /// sets cursor. /// This is used when handling LFUN_MOUSE_PRESS. - void mouseSetCursor(LCursor & cur); + bool mouseSetCursor(LCursor & cur); /// sets the selection. /* When \c backwards == false, set anchor diff --git a/src/text3.C b/src/text3.C index 96b6bfbeaf..f7d9a8806d 100644 --- a/src/text3.C +++ b/src/text3.C @@ -991,7 +991,8 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd) paste_internally = true; } - bv->mouseSetCursor(cur); + // we have to update after dePM triggered + bool update = bv->mouseSetCursor(cur); // Insert primary selection with middle mouse // if there is a local selection in the current buffer, @@ -1003,7 +1004,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd) lyx::dispatch(FuncRequest(LFUN_PRIMARY_SELECTION_PASTE, "paragraph")); } - if (cmd.button() == mouse_button::button1) { + if (!update && cmd.button() == mouse_button::button1) { needsUpdate = false; cur.noUpdate(); }