From: André Pönitz Date: Mon, 17 Feb 2003 16:16:49 +0000 (+0000) Subject: remove Inset::deletable() as it returns always 'true' X-Git-Tag: 1.6.10~17493 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=04f156900385b4a569aa3f0517d52b93c9fb7649;p=features.git 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 --- diff --git a/src/insets/inset.C b/src/insets/inset.C index 3e0a1ce90b..50d94871e9 100644 --- a/src/insets/inset.C +++ b/src/insets/inset.C @@ -56,12 +56,6 @@ Inset::Inset(Inset const & in, bool same_id) } -bool Inset::deletable() const -{ - return true; -} - - bool Inset::directWrite() const { return false; diff --git a/src/insets/inset.h b/src/insets/inset.h index 4957a395fb..3a309aee22 100644 --- a/src/insets/inset.h +++ b/src/insets/inset.h @@ -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; } diff --git a/src/insets/insetbib.h b/src/insets/insetbib.h index d037e829a4..14068e366f 100644 --- a/src/insets/insetbib.h +++ b/src/insets/insetbib.h @@ -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; } /// diff --git a/src/insets/insetlatexaccent.C b/src/insets/insetlatexaccent.C index 8c7788fec7..f05530fd6b 100644 --- a/src/insets/insetlatexaccent.C +++ b/src/insets/insetlatexaccent.C @@ -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; diff --git a/src/insets/insetlatexaccent.h b/src/insets/insetlatexaccent.h index d89a0afdfa..712f768151 100644 --- a/src/insets/insetlatexaccent.h +++ b/src/insets/insetlatexaccent.h @@ -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; diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index 5626bb1d17..b9c4833a66 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -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) { diff --git a/src/insets/insettabular.h b/src/insets/insettabular.h index 11275a1298..99da476657 100644 --- a/src/insets/insettabular.h +++ b/src/insets/insettabular.h @@ -282,8 +282,6 @@ private: /// bool movePrevCell(BufferView *, bool lock = false); /// - bool deletable() const; - /// int getCellXPos(int cell) const; /// void resetPos(BufferView *) const; diff --git a/src/text.C b/src/text.C index b8dae41293..388b5f92c0 100644 --- a/src/text.C +++ b/src/text.C @@ -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() ||