remove InsetText::updateLocal. Was neither missed nor active for a while now

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10230 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2005-07-15 22:19:49 +00:00
parent 282f86fbb1
commit 99f3ca194e
3 changed files with 10 additions and 52 deletions

View File

@ -1,3 +1,8 @@
2005-07-15 André Pönitz <poenitz@gmx.net>
* insettext.[Ch] (updateLocal): remove. Has been disabled for a while.
2005-07-15 André Pönitz <poenitz@gmx.net> 2005-07-15 André Pönitz <poenitz@gmx.net>
* Makefile.am: * Makefile.am:
@ -13,8 +18,7 @@
2005-07-15 André Pönitz <poenitz@gmx.net> 2005-07-15 André Pönitz <poenitz@gmx.net>
* insetcollapsable.[Ch]: * insetcollapsable.[Ch]:
* updatableinset.[Ch]: (scroll, setScroll) * updatableinset.[Ch] (scroll, setScroll): sanitize things
sanitize things
2005-07-14 Angus Leeming <leeming@lyx.org> 2005-07-14 Angus Leeming <leeming@lyx.org>

View File

@ -45,7 +45,6 @@
#include "frontends/Alert.h" #include "frontends/Alert.h"
#include "frontends/font_metrics.h" #include "frontends/font_metrics.h"
#include "frontends/LyXView.h"
#include "frontends/Painter.h" #include "frontends/Painter.h"
#include "support/lyxalgo.h" // lyx::count #include "support/lyxalgo.h" // lyx::count
@ -228,41 +227,6 @@ void InsetText::clearInset(Painter & pain, int x, int y) const
} }
void InsetText::updateLocal(LCursor & cur)
{
if (!text_.autoBreakRows_ && paragraphs().size() > 1) {
// collapse paragraphs
while (paragraphs().size() > 1) {
ParagraphList::iterator const first = paragraphs().begin();
ParagraphList::iterator second = first;
++second;
size_t const first_par_size = first->size();
if (!first->empty() &&
!second->empty() &&
!first->isSeparator(first_par_size - 1)) {
first->insertChar(first_par_size, ' ');
}
cur.clearSelection();
mergeParagraph(cur.buffer().params(), paragraphs(), 0);
}
}
if (!cur.selection())
cur.resetAnchor();
LyXView * lv = cur.bv().owner();
lv->view_state_changed();
lv->updateMenubar();
lv->updateToolbars();
if (old_pit != cur.pit()) {
lv->setLayout(text_.getPar(cur.pit()).layout()->name());
old_pit = cur.pit();
}
}
string const InsetText::editMessage() const string const InsetText::editMessage() const
{ {
return _("Opened Text Inset"); return _("Opened Text Inset");
@ -279,11 +243,6 @@ void InsetText::edit(LCursor & cur, bool left)
text_.setCursor(cur.top(), pit, pos); text_.setCursor(cur.top(), pit, pos);
cur.clearSelection(); cur.clearSelection();
finishUndo(); finishUndo();
#ifdef WITH_WARNINGS
#warning can someone check if/when this is needed?
#endif
//Andre?
// updateLocal(cur);
} }
@ -291,8 +250,6 @@ InsetBase * InsetText::editXY(LCursor & cur, int x, int y)
{ {
old_pit = -1; old_pit = -1;
return text_.editXY(cur, x, y); return text_.editXY(cur, x, y);
//sanitizeEmptyText(cur.bv());
//updateLocal(cur);
} }
@ -392,12 +349,10 @@ void InsetText::markNew(bool track_changes)
ParagraphList::iterator pit = paragraphs().begin(); ParagraphList::iterator pit = paragraphs().begin();
ParagraphList::iterator end = paragraphs().end(); ParagraphList::iterator end = paragraphs().end();
for (; pit != end; ++pit) { for (; pit != end; ++pit) {
if (track_changes) { if (track_changes)
pit->trackChanges(); pit->trackChanges();
} else { else // no-op when not tracking
// no-op when not tracking
pit->cleanChanges(); pit->cleanChanges();
}
} }
} }

View File

@ -144,11 +144,10 @@ public:
protected: protected:
/// ///
virtual void doDispatch(LCursor & cur, FuncRequest & cmd); virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const;
private:
/// ///
void updateLocal(LCursor &); virtual std::auto_ptr<InsetBase> doClone() const;
/// ///
void init(); void init();
/// ///