remove toggleSelection

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7459 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-07-31 10:24:22 +00:00
parent 900d9a7075
commit c0d7037aba
8 changed files with 8 additions and 43 deletions

View File

@ -820,8 +820,6 @@ void BufferView::Pimpl::insetUnlock()
void BufferView::Pimpl::toggleSelection(bool b)
{
if (bv_->theLockingInset())
bv_->theLockingInset()->toggleSelection(bv_, b);
screen().toggleSelection(bv_->text, bv_, b);
}

View File

@ -1,3 +1,10 @@
2003-07-31 André Pönitz <poenitz@gmx.net>
* insetcollapsable.h:
* insettabular.[Ch]:
* insettext.[Ch]: remove toggleSelection
2003-07-30 Martin Vermeer <martin.vermeer@hut.fi>
(with help from Juergen Spitzmueller)

View File

@ -152,10 +152,6 @@ public:
void selectSelectedWord(BufferView * bv) {
inset.selectSelectedWord(bv);
}
///
void toggleSelection(BufferView * bv, bool kill_selection) {
inset.toggleSelection(bv, kill_selection);
}
void markErased();

View File

@ -2497,13 +2497,6 @@ void InsetTabular::selectSelectedWord(BufferView * bv)
}
void InsetTabular::toggleSelection(BufferView * bv, bool kill_selection)
{
if (the_locking_inset)
the_locking_inset->toggleSelection(bv, kill_selection);
}
void InsetTabular::markErased()
{
for (int cell = 0; cell < tabular.getNumberOfCells(); ++cell)

View File

@ -187,8 +187,6 @@ public:
selectNextWordToSpellcheck(BufferView *, float & value) const;
///
void selectSelectedWord(BufferView *);
///
void toggleSelection(BufferView *, bool kill_selection);
void markErased();

View File

@ -2130,30 +2130,6 @@ void InsetText::selectSelectedWord(BufferView * bv)
}
void InsetText::toggleSelection(BufferView * bv, bool kill_selection)
{
if (the_locking_inset)
the_locking_inset->toggleSelection(bv, kill_selection);
int x = top_x + TEXT_TO_INSET_OFFSET;
RowList::iterator rit = text_.rows().begin();
RowList::iterator end = text_.rows().end();
int y_offset = top_baseline - rit->ascent_of_text();
int y = y_offset;
while (rit != end && y + rit->height() <= 0) {
y += rit->height();
++rit;
}
if (y_offset < 0)
y_offset = y;
if (need_update & SELECTION)
need_update = NONE;
bv->screen().toggleSelection(&text_, bv, kill_selection, y_offset, x);
}
bool InsetText::nextChange(BufferView * bv, lyx::pos_type & length)
{
if (the_locking_inset) {

View File

@ -197,8 +197,6 @@ public:
selectNextWordToSpellcheck(BufferView *, float & value) const;
///
void selectSelectedWord(BufferView *);
///
void toggleSelection(BufferView *, bool kill_selection);
/// mark as erased for change tracking
void markErased() { clear(true); };

View File

@ -1241,9 +1241,8 @@ InsetOld::RESULT LyXText::dispatch(FuncRequest const & cmd)
if (!isInInset() && bv->theLockingInset())
break;
if (cmd.button() == mouse_button::button1) {
if (!isInInset()) {
if (!isInInset())
bv->screen().toggleSelection(this, bv);
}
cursorHome();
selection.cursor = cursor;
cursorEnd();