mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-25 19:34:13 +02:00
b8c9e670c4
On a dark palette the folio view paints through QGraphicsView::render() instead of onto its viewport. In that case QGraphicsView never clears the scene's "update everything" flag, and while the flag is set every further QGraphicsScene::update() and item update is dropped: from the second Diagram::update() on, the grid toggle, the white/gray toggle and even a selection waited for an unrelated repaint. With a receiver on QGraphicsScene::changed() the scene clears the flag before it emits, so DiagramView now connects an empty receiver in its constructor. While the view paints for inversion, Diagram draws the grid dots a third of the way from the sheet color to black, so they come out as a soft gray on the dark sheet instead of as bright as the ink. Printing and export never take that path. Test in tst_qetpalette: sceneUpdatesReachARenderedView.