remove Inset::deletable() as it returns always 'true'

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6187 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-02-17 16:16:49 +00:00
parent 305c04ba8b
commit 04f1569003
8 changed files with 0 additions and 31 deletions

View File

@ -56,12 +56,6 @@ Inset::Inset(Inset const & in, bool same_id)
}
bool Inset::deletable() const
{
return true;
}
bool Inset::directWrite() const
{
return false;

View File

@ -228,8 +228,6 @@ public:
virtual int docbook(Buffer const *, std::ostream &, bool) const = 0;
/// Updates needed features for this inset.
virtual void validate(LaTeXFeatures & features) const;
///
virtual bool deletable() const;
/// returns LyX code associated with the inset. Used for TOC, ...)
virtual Inset::Code lyxCode() const { return NO_CODE; }

View File

@ -45,10 +45,6 @@ public:
void edit(BufferView * bv, bool front = true);
///
EDITABLE editable() const { return IS_EDITABLE; }
/// A user can't neither insert nor delete this inset
//bool deletable() const {
// return false;
//}
/// keep .lyx format compatible
bool directWrite() const { return true; }
///

View File

@ -660,12 +660,6 @@ int InsetLatexAccent::docbook(Buffer const *, ostream & os, bool) const
}
bool InsetLatexAccent::deletable() const
{
return true;
}
bool InsetLatexAccent::directWrite() const
{
return true;

View File

@ -62,8 +62,6 @@ public:
///
int docbook(Buffer const *, std::ostream &, bool mixcont) const;
///
bool deletable() const;
///
bool directWrite() const;
///
virtual Inset * clone(Buffer const &, bool same_id = false) const;

View File

@ -1769,12 +1769,6 @@ bool InsetTabular::movePrevCell(BufferView * bv, bool lock)
}
bool InsetTabular::deletable() const
{
return true;
}
void InsetTabular::setFont(BufferView * bv, LyXFont const & font, bool tall,
bool selectall)
{

View File

@ -282,8 +282,6 @@ private:
///
bool movePrevCell(BufferView *, bool lock = false);
///
bool deletable() const;
///
int getCellXPos(int cell) const;
///
void resetPos(BufferView *) const;

View File

@ -2773,10 +2773,7 @@ void LyXText::backspace(BufferView * bview)
setCursorIntern(bview, cursor.par(), cursor.pos()- 1,
false, cursor.boundary());
// some insets are undeletable here
if (cursor.par()->isInset(cursor.pos())) {
if (!cursor.par()->getInset(cursor.pos())->deletable())
return;
// force complete redo when erasing display insets
// this is a cruel method but safe..... Matthias
if (cursor.par()->getInset(cursor.pos())->display() ||