mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
This patch moves the dialogs hidding/update from BufferView::setBuffer() to LyXView::setBuffer()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14798 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
020a793ef9
commit
5bda7ca222
@ -12,6 +12,7 @@
|
||||
* \author André Pönitz
|
||||
* \author Dekel Tsur
|
||||
* \author Jürgen Vigna
|
||||
* \author Abdelrazak Younes
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
@ -266,7 +267,6 @@ void BufferView::Pimpl::setBuffer(Buffer * b)
|
||||
<< " No Buffer!" << endl;
|
||||
// We are closing the buffer, use the first buffer as current
|
||||
buffer_ = bufferlist.first();
|
||||
owner_->getDialogs().hideBufferDependent();
|
||||
} else {
|
||||
// Set current buffer
|
||||
buffer_ = b;
|
||||
@ -277,7 +277,6 @@ void BufferView::Pimpl::setBuffer(Buffer * b)
|
||||
anchor_ref_ = 0;
|
||||
offset_ref_ = 0;
|
||||
|
||||
|
||||
// If we're quitting lyx, don't bother updating stuff
|
||||
if (quitting)
|
||||
return;
|
||||
@ -297,11 +296,6 @@ void BufferView::Pimpl::setBuffer(Buffer * b)
|
||||
cursor_.setCursor(buffer_->getCursor().asDocIterator(&(buffer_->inset())));
|
||||
cursor_.setSelection();
|
||||
}
|
||||
|
||||
// Buffer-dependent dialogs should be updated or
|
||||
// hidden. This should go here because some dialogs (eg ToC)
|
||||
// require bv_->text.
|
||||
owner_->getDialogs().updateBufferDependent(true);
|
||||
}
|
||||
|
||||
update();
|
||||
|
@ -134,7 +134,19 @@ void LyXView::setBuffer(Buffer * b)
|
||||
if (work_area_->bufferView().buffer())
|
||||
disconnectBuffer();
|
||||
|
||||
if (!b)
|
||||
getDialogs().hideBufferDependent();
|
||||
|
||||
work_area_->bufferView().setBuffer(b);
|
||||
|
||||
if (work_area_->bufferView().buffer())
|
||||
{
|
||||
// Buffer-dependent dialogs should be updated or
|
||||
// hidden. This should go here because some dialogs (eg ToC)
|
||||
// require bv_->text.
|
||||
getDialogs().updateBufferDependent(true);
|
||||
}
|
||||
|
||||
updateMenubar();
|
||||
updateToolbars();
|
||||
updateLayoutChoice();
|
||||
|
Loading…
Reference in New Issue
Block a user