From: Bo Peng Date: Fri, 16 Feb 2007 15:38:34 +0000 (+0000) Subject: Forget to set selection in r17213 X-Git-Tag: 1.6.10~10790 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=204f783bb1d51d4fe7ca1a0c7fd41669bbc52425;p=lyx.git Forget to set selection in r17213 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17222 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index f5593d5260..d196a70b14 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -537,8 +537,13 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd) case LFUN_MOUSE_RELEASE: //lyxerr << "# InsetTabular::MouseRelease\n" << bvcur << endl; if (cmd.button() == mouse_button::button1) { - if (bvcur.selection() && !tablemode(bvcur)) - saveSelection(bvcur); + if (bvcur.selection()) { + // Bug3238: disable persistent selection for table cells for now + if (tablemode(bvcur)) + theSelection().haveSelection(true); + else + saveSelection(bvcur); + } } else if (cmd.button() == mouse_button::button3) InsetTabularMailer(*this).showDialog(&cur.bv()); break; @@ -597,8 +602,13 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd) TextMetrics const & tm = cur.bv().textMetrics(cell(cur.idx())->getText(0)); cur.pos() = tm.x2pos(cur.pit(), 0, cur.targetX()); - if (cmd.action == LFUN_DOWN_SELECT && !tablemode(cur)) - saveSelection(cur); + if (cmd.action == LFUN_DOWN_SELECT) { + // Bug3238: disable persistent selection for table cells for now + if (tablemode(cur)) + theSelection().haveSelection(true); + else + saveSelection(cur); + } } if (sl == cur.top()) { // we trick it to go to the RIGHT after leaving the @@ -624,8 +634,13 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd) ParagraphMetrics const & pm = tm.parMetrics(cur.lastpit()); cur.pos() = tm.x2pos(cur.pit(), pm.rows().size()-1, cur.targetX()); - if (cmd.action == LFUN_UP_SELECT && !tablemode(cur)) - saveSelection(cur); + if (cmd.action == LFUN_UP_SELECT) { + // Bug3238: disable persistent selection for table cells for now + if (tablemode(cur)) + theSelection().haveSelection(true); + else + saveSelection(cur); + } } if (sl == cur.top()) { cmd = FuncRequest(LFUN_FINISHED_UP);