]> git.lyx.org Git - lyx.git/blobdiff - src/text2.C
Change the latex font names in order to match the names of type1inst.
[lyx.git] / src / text2.C
index 0c030a5cbd1100aa38fd92c8858b42b4cebde228..e6b50a09c976767cb6ea86f82bd3e44d063d5db4 100644 (file)
@@ -389,17 +389,24 @@ void LyXText::insertRow(Row * row, Paragraph * par,
 // removes the row and reset the touched counters
 void LyXText::removeRow(Row * row) const
 {
+       Row * row_prev = row->previous();
        if (row->next())
-               row->next()->previous(row->previous());
-       if (!row->previous()) {
+               row->next()->previous(row_prev);
+       if (!row_prev) {
                firstrow = row->next();
 //             lyx::Assert(firstrow);
        } else  {
-               row->previous()->next(row->next());
+               row_prev->next(row->next());
        }
-       if (row == lastrow)
-               lastrow = row->previous();
-   
+       if (row == lastrow) {
+               lyx::Assert(!row->next());
+               lastrow = row_prev;
+       }
+       if (refresh_row == row) {
+               refresh_row = row_prev ? row_prev : row->next();
+               // what about refresh_y, refresh_height
+       }
+
        height -= row->height(); // the text becomes smaller
    
        delete row;
@@ -1796,14 +1803,7 @@ void LyXText::cutSelection(BufferView * bview, bool doclear, bool realcut)
 
 void LyXText::copySelection(BufferView * bview)
 {
-       // Stuff what we got on the clipboard. Even if there is no selection.
-
-       // There is a problem with having the stuffing here in that the
-       // larger the selection the slower LyX will get. This can be
-       // solved by running the line below only when the selection has
-       // finished. The solution used currently just works, to make it
-       // faster we need to be more clever and probably also have more
-       // calls to stuffClipboard. (Lgb)
+       // stuff the selection onto the X clipboard, from an explicit copy request
        bview->stuffClipboard(selectionAsString(bview->buffer(), true));
 
        // this doesnt make sense, if there is no selection