mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 02:28:35 +00:00
Make Ctrl-Mouse open an included file for editing.
It might be nice to do this also for other insets that allow editing. To do that properly, we'd want to standardize how such insets call an external (or internal) program, which I guess would mean a virtual method corresponding to editIncluded. When it exists (i.e., isn't null), then we could call it, and we'd only need one centralized method to do that. But at the moment, we have editGraphics, etc.
This commit is contained in:
parent
276ffc262c
commit
c286228315
@ -318,6 +318,16 @@ void InsetInclude::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_MOUSE_RELEASE: {
|
||||
if (cmd.modifier() == ControlModifier) {
|
||||
FileName const incfile = includedFileName(buffer(), params());
|
||||
string const & incname = incfile.absFileName();
|
||||
editIncluded(incname);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// fall through
|
||||
|
||||
//pass everything else up the chain
|
||||
default:
|
||||
InsetCommand::doDispatch(cur, cmd);
|
||||
|
Loading…
Reference in New Issue
Block a user