mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-23 08:44:01 +00:00
disable painting updates when adding/removing a workArea. This fixes these spurious messages with Qt4.1:
When opening another document, the following is printed to the console:
QWidget::repaint: recursive repaint detected.
QPixmap::operator=: Cannot assign to pixmap during painting
Painter must be active to set rendering hints
[repeated many times here]
Painter must be active to set rendering hints
QPainter:🔚 Painter is not active, aborted
QPixmap::operator=: Cannot assign to pixmap during painting
QPixmap::operator=: Cannot assign to pixmap during painting
currentTabChanged 1File/c/work/file2.lyx
and, when closing LyX:
QPixmap::operator=: Cannot assign to pixmap during painting
QPaintDevice: Cannot destroy paint device that is being painted. Be sure to QPainter::end() painters!
I suspect that solving these issues might also solve the missing close
tab button problem.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19783 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9e8f0b9d91
commit
a6936fe7d5
@ -841,6 +841,7 @@ WorkArea * GuiView::workArea(Buffer & buffer)
|
||||
WorkArea * GuiView::addWorkArea(Buffer & buffer)
|
||||
{
|
||||
GuiWorkArea * wa = new GuiWorkArea(buffer, *this);
|
||||
wa->setUpdatesEnabled(false);
|
||||
d.tab_widget_->addTab(wa, toqstr(makeDisplayPath(buffer.fileName(), 30)));
|
||||
wa->bufferView().updateMetrics(false);
|
||||
if (d.stack_widget_)
|
||||
@ -902,6 +903,7 @@ void GuiView::removeWorkArea(WorkArea * work_area)
|
||||
updateToc();
|
||||
|
||||
GuiWorkArea * gwa = dynamic_cast<GuiWorkArea *>(work_area);
|
||||
gwa->setUpdatesEnabled(false);
|
||||
BOOST_ASSERT(gwa);
|
||||
int index = d.tab_widget_->indexOf(gwa);
|
||||
d.tab_widget_->removeTab(index);
|
||||
|
Loading…
x
Reference in New Issue
Block a user