"Bo Peng" <[EMAIL PROTECTED]> writes:

| > | +                     ParIterator const end = b->par_iterator_end();
| > | +                     for (; it != end; ++it)
| > | +                             if (it.pit() == pit) {
| > | +                                     bv_->setCursor(makeDocIterator(it, 
pos));
| > | +                                     bv_->update(Update::FitCursor);
| > | +                                     break;
| > | +                             }
| > | +             }
| > | +     }
| >
| > This should be refactored.
| 
| I did not touch this part since it is used only once here and things
| will be cahinging (removal of id etc). I would propose an addition of
| operator[pit] to paragraphs, then this part can be shortened lot.

It should still be refactored.

If not for anything else that the code gets easier to read.
(I do not quite see how removal of id plays into this.)
(And no; operator[pit] on paragraphs won't solve it, just make the
cursor placement even more coarse grained)

| > | Index: src/frontends/gtk/GView.C
| > | ===================================================================
| > | --- src/frontends/gtk/GView.C (revision 13495)
| > | +++ src/frontends/gtk/GView.C (working copy)
| > | @@ -117,6 +117,14 @@
| > |
| > |  bool GView::on_delete_event(GdkEventAny * /*event*/)
| > |  {
| > | +     // FIXME
| > | +     // for qt, this has been changed to the following code
| > | +     // Similar change to the GTK frontend may be needed.
| > | +     //
| > | +     // trigger LFUN_QUIT instead of quit directly
| > | +     // since LFUN_QUIT may have more cleanup stuff
| > | +     //
| > | +     // getLyXFunc().dispatch(FuncRequest(LFUN_QUIT));
| > |       QuitLyX(false);
| > |       return true;
| >
| > Why not just change it. Can it harm?
| 
| Since I do not know/have gtk and xform and can not test it.

The same code should just work. Just change it. I will make sure that
it at least compiles.

-- 
        Lgb

Reply via email to