]> git.lyx.org Git - features.git/commitdiff
Fix bug 5150: Hyperlink makes no sense with multi-paragraph selection, let alone...
authorRichard Heck <rgheck@comcast.net>
Sat, 9 Aug 2008 02:09:38 +0000 (02:09 +0000)
committerRichard Heck <rgheck@comcast.net>
Sat, 9 Aug 2008 02:09:38 +0000 (02:09 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26106 a592a061-630c-0410-9148-cb99ea01b6c8

src/Text3.cpp

index ff971cb0b51a760103b94725f001ef9916012f84..993aa9810e9bbc814abf69aa36e84393bb029d49 100644 (file)
@@ -1996,6 +1996,13 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
                code = TOC_CODE;
                break;
        case LFUN_HYPERLINK_INSERT:
+               if (cur.selection() && 
+                   (cur.isMultiCell() ||
+                   cur.selBegin().pit() != cur.selEnd().pit())
+                        ) {
+                       enable = false;
+                       break;
+               }
                code = HYPERLINK_CODE;
                break;
        case LFUN_QUOTE_INSERT: