mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 14:29:21 +00:00
Fix crash on first load with mouse wheel: this was because the scrollbar was not updated.
* loadLyXFile::setBuffer(): get rid of a premature optimisation, we make sure that everything is properly drawn in any case. * GuiView::setCurrentWorkArea(): make sure everything is updated if we don't change tab. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19717 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2419c80657
commit
13a2812c22
@ -111,14 +111,9 @@ Buffer const * LyXView::buffer() const
|
||||
|
||||
void LyXView::setBuffer(Buffer * newBuffer)
|
||||
{
|
||||
BOOST_ASSERT(newBuffer);
|
||||
busy(true);
|
||||
|
||||
Buffer * oldBuffer = buffer();
|
||||
if (oldBuffer == newBuffer) {
|
||||
busy(false);
|
||||
return;
|
||||
}
|
||||
|
||||
WorkArea * wa = workArea(*newBuffer);
|
||||
if (wa == 0) {
|
||||
updateLabels(*newBuffer->getMasterBuffer());
|
||||
|
@ -892,7 +892,12 @@ void GuiView::setCurrentWorkArea(WorkArea * work_area)
|
||||
|
||||
GuiWorkArea * wa = dynamic_cast<GuiWorkArea *>(work_area);
|
||||
BOOST_ASSERT(wa);
|
||||
if (wa != d.tab_widget_->currentWidget())
|
||||
// Switch to the work area.
|
||||
d.tab_widget_->setCurrentWidget(wa);
|
||||
else
|
||||
// Make sure the work area is up to date.
|
||||
currentTabChanged(d.tab_widget_->currentIndex());
|
||||
wa->setFocus();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user