]> git.lyx.org Git - features.git/commitdiff
Get rid of Paragraph::insetAllowed()
authorAbdelrazak Younes <younes@lyx.org>
Fri, 12 Sep 2008 13:57:15 +0000 (13:57 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 12 Sep 2008 13:57:15 +0000 (13:57 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26372 a592a061-630c-0410-9148-cb99ea01b6c8

src/Paragraph.cpp
src/Paragraph.h
src/paragraph_funcs.cpp

index 026109683737e4279511e3b32d8ae86169dad875..98cd13d81111472f215798c961f263024c70b6d5 100644 (file)
@@ -1304,12 +1304,6 @@ void Paragraph::insertInset(pos_type pos, Inset * inset,
 }
 
 
-bool Paragraph::insetAllowed(InsetCode code)
-{
-       return !d->inset_owner_ || d->inset_owner_->insetAllowed(code);
-}
-
-
 void Paragraph::resetFonts(Font const & font)
 {
        d->fontlist_.clear();
index 2e720d8aa6162817fff17b6d54b30f1c47c251e3..c5bf500043875cc3d7f6f465179cf7889d4ea865 100644 (file)
@@ -308,8 +308,6 @@ public:
        void insertInset(pos_type pos, Inset * inset,
                         Font const &, Change const & change);
        ///
-       bool insetAllowed(InsetCode code);
-       ///
        Inset * getInset(pos_type pos);
        ///
        Inset const * getInset(pos_type pos) const;
index 7c8c5ab0d1c1888c7467743d95230aa0ccbf1123..b987be0f7444fc63f13ec4167363cd25122e2c6b 100644 (file)
@@ -47,7 +47,8 @@ static bool moveItem(Paragraph & fromPar, pos_type fromPos,
                        tmpInset = fromPar.releaseInset(fromPos);
                }
 
-               if (!toPar.insetAllowed(tmpInset->lyxCode())) {
+               Inset * inset = toPar.inInset();
+               if (inset && inset->insetAllowed(tmpInset->lyxCode())) {
                        delete tmpInset;
                        return false;
                }