From fa169b8af604c6728f3a42df1e8095753bb96cef Mon Sep 17 00:00:00 2001 From: Richard Kimberly Heck Date: Fri, 26 Apr 2019 21:59:52 -0400 Subject: [PATCH] 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. --- src/insets/InsetInclude.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index 78da0cb6c2..530adfcf41 100755 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -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); -- 2.39.5