Abdelrazak Younes <[EMAIL PROTECTED]> writes:

| Hello,
| 
| This patch makes LyXText code use directly LyXText::dispatch() instead
| of the cur.bv().owner()->dispatch() redirection.
| 
| Objection?
| 
| Abdel.
| Index: text2.C
| ===================================================================
| --- text2.C   (revision 15030)
| +++ text2.C   (working copy)
| @@ -366,13 +366,13 @@
|       if (lyxlayout->is_environment) {
|               // move everything in a new environment inset
|               lyxerr[Debug::DEBUG] << "setting layout " << layout << endl;
| -             bv.owner()->dispatch(FuncRequest(LFUN_LINE_BEGIN));
| -             bv.owner()->dispatch(FuncRequest(LFUN_LINE_END_SELECT));
| -             bv.owner()->dispatch(FuncRequest(LFUN_CUT));
| +             dispatch(cur, FuncRequest(LFUN_LINE_BEGIN));
| +             dispatch(cur, FuncRequest(LFUN_LINE_END_SELECT));
| +             dispatch(cur, FuncRequest(LFUN_CUT));
|               InsetBase * inset = new InsetEnvironment(params, layout);
|               insertInset(cur, inset);
|               //inset->edit(cur, true);
| -             //bv.owner()->dispatch(FuncRequest(LFUN_PASTE));
| +             //dispatch(cur, FuncRequest(LFUN_PASTE));
|               return;

The dispatch function called is not the same dispatch function
anymore. There might be a reason why we have decided to go through the
top most dispatch and let that handle the traversement of the dispatch
hierarchy. If this is an ivalid reason or not I cannot say, but there
you have it.... the reason why I am not confident that changes like
this albeit seemingly correct, are wanted.

-- 
        Lgb

Reply via email to