mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
InsetInfo: allow select and copy of text inside InsetInfo, trigger the info dialog correctly
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25151 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
95a5be2891
commit
f5101ebec8
@ -353,7 +353,7 @@ Menuset
|
||||
#
|
||||
|
||||
Menu "context-info"
|
||||
Item "Settings...|S" "inset-settings"
|
||||
Item "Settings...|S" "inset-settings info"
|
||||
End
|
||||
|
||||
End
|
||||
|
@ -953,7 +953,6 @@ FuncStatus BufferView::getStatus(FuncRequest const & cmd)
|
||||
case BRANCH_CODE:
|
||||
case BOX_CODE:
|
||||
case LISTINGS_CODE:
|
||||
case INFO_CODE:
|
||||
enable = (cmd.argument().empty() ||
|
||||
cmd.getArg(0) == insetName(next_code));
|
||||
break;
|
||||
|
@ -56,9 +56,10 @@ InsetInfo::InsetInfo(Buffer const & buf, string const & name)
|
||||
}
|
||||
|
||||
|
||||
Inset * InsetInfo::editXY(Cursor &, int, int)
|
||||
Inset * InsetInfo::editXY(Cursor & cur, int x, int y)
|
||||
{
|
||||
return this;
|
||||
cur.push(*this);
|
||||
return InsetText::editXY(cur, x, y);
|
||||
}
|
||||
|
||||
|
||||
@ -168,19 +169,19 @@ bool InsetInfo::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
|
||||
void InsetInfo::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
{
|
||||
// FIXME: we should allow selection, copy etc...
|
||||
// allow selection, copy but not cut, delete etc
|
||||
switch (cmd.action) {
|
||||
case LFUN_MOUSE_PRESS:
|
||||
case LFUN_MOUSE_RELEASE:
|
||||
case LFUN_MOUSE_MOTION:
|
||||
case LFUN_MOUSE_DOUBLE:
|
||||
case LFUN_MOUSE_TRIPLE:
|
||||
// do not dispatch to InsetText
|
||||
cur.dispatched();
|
||||
case LFUN_COPY:
|
||||
case LFUN_INSET_SETTINGS:
|
||||
InsetText::doDispatch(cur, cmd);
|
||||
break;
|
||||
|
||||
default:
|
||||
InsetText::doDispatch(cur, cmd);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user