From: Jürgen Vigna Date: Tue, 26 Feb 2002 15:17:00 +0000 (+0000) Subject: handle font changing stuff when we have a cell selection (fix # 217). X-Git-Tag: 1.6.10~19808 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0942c39b772b92a1146ab064887a7a4a8e7f3d8f;p=lyx.git handle font changing stuff when we have a cell selection (fix # 217). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3588 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 93886fcd60..463c94a1ca 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -2,6 +2,9 @@ * insettabular.C (localDispatch): force a SELECTION update if we had a selection and we passed the event down to the inset (fix #213) + (localDispatch): handle font changing stuff when we have a cell + selection so that the selection is not rewoked. I don't really like + this fix, but it's the only way I see to do it right now. 2002-02-22 Juergen Vigna diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index 6230440d28..e3311eb5a0 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -1186,10 +1186,31 @@ InsetTabular::localDispatch(BufferView * bv, kb_action action, } // ATTENTION: the function above has to be PASTE and PASTESELECTION!!! default: + // handle font changing stuff on selection before we lock the inset + // in the default part! + result = UNDISPATCHED; + if (hs) { + switch(action) { + case LFUN_LANGUAGE: + case LFUN_EMPH: + case LFUN_BOLD: + case LFUN_NOUN: + case LFUN_CODE: + case LFUN_SANS: + case LFUN_ROMAN: + case LFUN_DEFAULT: + case LFUN_UNDERLINE: + case LFUN_FONT_SIZE: + if (bv->Dispatch(action, arg)) + result = DISPATCHED; + break; + default: + break; + } + } // we try to activate the actual inset and put this event down to // the insets dispatch function. - result = UNDISPATCHED; - if (the_locking_inset) + if ((result == DISPATCHED) || the_locking_inset) break; nodraw(true); if (activateCellInset(bv)) {