| 1284 | } |
| 1285 | |
| 1286 | void DiffTextWindow::paintEvent(QPaintEvent* e) |
| 1287 | { |
| 1288 | QRect invalidRect = e->rect(); |
| 1289 | if(invalidRect.isEmpty()) |
| 1290 | return; |
| 1291 | |
| 1292 | if(d->getDiff3LineVector() == nullptr || (d->m_diff3WrapLineVector.empty() && d->m_bWordWrap)) |
| 1293 | { |
| 1294 | QPainter p(this); |
| 1295 | p.fillRect(invalidRect, gOptions->backgroundColor()); |
| 1296 | return; |
| 1297 | } |
| 1298 | |
| 1299 | LineRef endLine = std::min(d->m_firstLine + getNofVisibleLines() + 2, getNofLines()); |
| 1300 | RLPainter p(this, gOptions->m_bRightToLeftLanguage, width(), fontMetrics().horizontalAdvance('0')); |
| 1301 | |
| 1302 | p.setFont(font()); |
| 1303 | p.QPainter::fillRect(invalidRect, gOptions->backgroundColor()); |
| 1304 | |
| 1305 | draw(p, invalidRect, d->m_firstLine, endLine); |
| 1306 | p.end(); |
| 1307 | |
| 1308 | d->m_oldFirstLine = d->m_firstLine; |
| 1309 | d->m_selection.clearOldSelection(); |
| 1310 | } |
| 1311 | |
| 1312 | void DiffTextWindow::print(RLPainter& p, const QRect&, qint32 firstLine, const LineType nofLinesPerPage) |
| 1313 | { |
nothing calls this directly
no test coverage detected