MCPcopy Create free account
hub / github.com/OpenOrienteering/mapper / updateDrawingLater

Method updateDrawingLater

src/gui/map/map_widget.cpp:585–600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

583}
584
585void MapWidget::updateDrawingLater(const QRectF& map_rect, int pixel_border)
586{
587 QRect viewport_rect = calculateViewportBoundingBox(map_rect, pixel_border);
588
589 if (viewport_rect.intersects(rect()))
590 {
591 if (!cached_update_rect.isValid())
592 {
593 // Start the update timer
594 QTimer::singleShot(15, this, &MapWidget::updateDrawingLaterSlot);
595 }
596
597 // NOTE: this may require a mutex for concurrent access with updateDrawingLaterSlot()?
598 rectIncludeSafe(cached_update_rect, viewport_rect);
599 }
600}
601
602void MapWidget::updateDrawingLaterSlot()
603{

Callers 1

updateMapWidgetMethod · 0.80

Calls 3

rectIncludeSafeFunction · 0.85
intersectsMethod · 0.80
isValidMethod · 0.45

Tested by

no test coverage detected