commit c2862283152bbf92a5ae13ba9526bcc56ce77abc
Author: Richard Kimberly Heck <[email protected]>
Date:   Fri Apr 26 21:59:52 2019 -0400

    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 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp
index 78da0cb..530adfc 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);

Reply via email to