diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 3451fd64e9..6ce68cdc4b 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,10 @@ + +2004-02-04 Alfredo Braunstein + + * insettext.C (edit): + (updateLocal): use the cur argument instead of the global cursor + * insetcollapsable.C (edit): dont call inset.edit(x,y) when opening + 2004-02-01 Lars Gullik Bjonnes * insetlatexaccent.C (checkContents): "c" -> 'c' in calls to contains diff --git a/src/insets/insetcollapsable.C b/src/insets/insetcollapsable.C index 59857a0a1b..cbea996dcb 100644 --- a/src/insets/insetcollapsable.C +++ b/src/insets/insetcollapsable.C @@ -299,13 +299,18 @@ void InsetCollapsable::edit(LCursor & cur, int x, int y) //lyxerr << "InsetCollapsable: edit xy" << endl; if (status_ == Collapsed) { setStatus(Open); + inset.edit(cur, true); +#warning look here +//we are not calling edit(x,y) because there are no coordinates in the +//inset yet. I personally think it's ok. (ab) } else { if (y <= button_dim.y2) y = 0; else y += inset.ascent() - height_collapsed(); + + inset.edit(cur, x, y); } - inset.edit(cur, x, y); } diff --git a/src/insets/insettext.C b/src/insets/insettext.C index f06f56b0e0..195a2e31e0 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -253,7 +253,7 @@ void InsetText::updateLocal(LCursor & cur) lv->updateMenubar(); lv->updateToolbar(); if (old_par != cur.par()) { - lv->setLayout(text_.cursorPar()->layout()->name()); + lv->setLayout(text_.getPar(cur.par())->layout()->name()); old_par = cur.par(); } } @@ -287,7 +287,7 @@ void InsetText::edit(LCursor & cur, bool left) setViewCache(&cur.bv()); int const par = left ? 0 : paragraphs().size() - 1; int const pos = left ? 0 : paragraphs().back().size(); - text_.setCursor(par, pos); + text_.setCursor(cur.current(), par, pos); cur.clearSelection(); finishUndo(); sanitizeEmptyText(cur.bv());