Georg Baum wrote:
Abdelrazak Younes wrote:

I would agree that the call to connectBuffer() could be saved if this
buffer was already connected. But this is not the case, only one Buffer
is connected at a time to the LyXView. While it could be possible to
connect multiple buffers this is not done right now as the visible
buffer is disconnected before a buffer switch happen via the
disconnectBuffer() call in setBuffer():

void LyXView::setBuffer(Buffer * b)
{
if (work_area_->bufferView().buffer())
disconnectBuffer();


The layout combo shall always be connected to the visible buffer and
that's what setLayout() is doing.

We are getting closer :-) I always assumed that the previous code was
correct, i.e. connectBuffer/setLayout was not needed. Now you tell me that
it was not ccorrect, and in fact a connectBuffer/setLayout was missing. If
that is the case (I did not test the old code) then you fixed a different
bug as a side effect and I don't have any objections anymore ;-)

Good ;-)

Abdel.

Reply via email to