]> git.lyx.org Git - features.git/blobdiff - src/insets/Inset.cpp
Move handling of LFUN_MOUSE_RELEASE up to Inset and remove the edit() functions for...
[features.git] / src / insets / Inset.cpp
index 91508608fbd7c25c472e26e9f1b149fbe6736e69..29984f0679253b0e0568d59d5770c989b56e9f2a 100644 (file)
@@ -220,10 +220,20 @@ void Inset::dispatch(Cursor & cur, FuncRequest & cmd)
 void Inset::doDispatch(Cursor & cur, FuncRequest &cmd)
 {
        switch (cmd.action) {
+       case LFUN_MOUSE_RELEASE:
+               // if the derived inset did not explicitly handle mouse_release,
+               // we assume we request the settings dialog
+               if (!cur.selection() && cmd.button() == mouse_button::button1) {
+                       FuncRequest tmpcmd(LFUN_INSET_SETTINGS);
+                       dispatch(cur, tmpcmd);
+               }
+               break;
+
        case LFUN_INSET_SETTINGS:
                showInsetDialog(&cur.bv());
                cur.dispatched();
                break;
+
        default:
                cur.noUpdate();
                cur.undispatched();