Pavel Sanda <[EMAIL PROTECTED]> writes: > this issue is related to LFUN_GRAPHICS_GROUPS_UNIFY case, which is in a sense > similar lfun.
Let's see... case LFUN_GRAPHICS_GROUPS_UNIFY: { LASSERT(lyx_view_, /**/); if (argument.empty() || !lyx_view_->buffer()) break; I do not see why you test against an empty argument, since many other wrong arguments could be given. The test for buffer() is not needed unless your lfun is declared NoBuffer. //view()->cursor().recordUndoFullDocument(); let inset-apply do that job graphics::unifyGraphicsGroups(*lyx_view_->buffer(), argument); lyx_view_->buffer()->markDirty(); This is not needed unless the function is marked ReadOnly updateFlags = Update::Force | Update::FitCursor; I _think_ this is not needed. break; } Typically, this should be moved to Buffer. > it should be logically in buffer, but i'm forced to use view->cursor so its in > lyxfunc. i choosed lyxfunc instead of text because i wanted to have similar > lfun > closely in one place (guess where LFUN_ALL_INSETS_TOGGLE is...) so unless > you have very strong opinion about the matter i let it there. I still think that BufferView (since you need a cursor) is a better place. JMarc