Get rid of Paragraph::insetAllowed()

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26372 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-09-12 13:57:15 +00:00
parent 6cc68a2663
commit 0b18d24e56
3 changed files with 2 additions and 9 deletions

View 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();

View 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;

View 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;
}