]> git.lyx.org Git - features.git/commitdiff
fix getStatus of LFUN_DISSOLVE_INSET:
authorJürgen Spitzmüller <spitz@lyx.org>
Sun, 3 Sep 2006 13:39:54 +0000 (13:39 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Sun, 3 Sep 2006 13:39:54 +0000 (13:39 +0000)
* src/text3.C (getStatus):
disable the lfun in MainText.
* src/insets/insettabular.C (getStatus):
disable inset-dissolve completely.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14879 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/insettabular.C
src/text3.C

index 055ca76456e1df49b372495ed62f94ab696bc76c..35912ba4e3454a42b180f0a3bf01bb534cbcc20f 100644 (file)
@@ -1045,6 +1045,28 @@ bool InsetTabular::getStatus(LCursor & cur, FuncRequest const & cmd,
                        return true;
                }
 
+       case LFUN_INSET_DISSOLVE: {
+               status.enabled(false);
+               return true;
+       }
+
+       // because of the dissolve handling in insettext:
+       case LFUN_CHAR_DELETE_FORWARD:
+               if (!cur.selection() && cur.depth() > 1
+                   && cur.pit() == cur.lastpit()
+                   && cur.pos() == cur.lastpos()) {
+               status.enabled(false);
+               return true;
+               }
+               // Fall through
+
+       case LFUN_CHAR_DELETE_BACKWARD:
+               if (cur.depth() > 1 && cur.pit() == 0 && cur.pos() == 0) {
+               status.enabled(false);
+               return true;
+               }
+               // Fall through
+
        case LFUN_INSET_MODIFY:
                if (translate(cmd.getArg(0)) == TABULAR_CODE) {
                        status.enabled(true);
index 4b5d0477e0de6b8f757883a22f2d847f4a106c49..29c791407a3b9273ec557f942f411b3fada56c30 100644 (file)
@@ -1731,7 +1731,7 @@ bool LyXText::getStatus(LCursor & cur, FuncRequest const & cmd,
        }
 
        case LFUN_INSET_DISSOLVE: {
-               enable = &cur.inset() && cur.inTexted();
+               enable = !isMainText() && cur.inTexted();
                break;
        }