]> git.lyx.org Git - lyx.git/blobdiff - src/Text3.cpp
endl is defined in ostream, iomanip is not enough (it matters for gcc 4.3)
[lyx.git] / src / Text3.cpp
index a38b5ab579b9da6d0118e67c1c1572666218f535..b5bdc3b4ec0816027853d61ae8722b37fcb9e7dc 100644 (file)
@@ -873,14 +873,20 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                break;
 
        case LFUN_INSET_SETTINGS: {
-               // if there is an inset at cursor, access this
-               Inset * inset = cur.nextInset();
-               if (inset) {
-                       inset->showInsetDialog(bv);
+               Inset & inset = cur.inset();
+               if (cmd.getArg(0) == insetName(inset.lyxCode())) {
+                       // This inset dialog has been explicitely requested.
+                       inset.showInsetDialog(bv);
+                       break;
+               }
+               // else, if there is an inset at the cursor, access this
+               Inset * next_inset = cur.nextInset();
+               if (next_inset) {
+                       next_inset->showInsetDialog(bv);
                        break;
                }
-               // if not work, access the underlying inset.
-               cur.inset().showInsetDialog(bv);
+               // if not then access the underlying inset.
+               inset.showInsetDialog(bv);
                break;
        }