mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Fix crash when creating guide and no pages in layout
This commit is contained in:
parent
2f49329634
commit
04e6529efd
@ -585,6 +585,9 @@ void QgsLayoutRuler::mouseMoveEvent( QMouseEvent *event )
|
||||
QgsLayout *layout = mView->currentLayout();
|
||||
int pageNo = layout->pageCollection()->pageNumberForPoint( displayPos );
|
||||
QgsLayoutItemPage *page = layout->pageCollection()->page( pageNo );
|
||||
if ( !page )
|
||||
return;
|
||||
|
||||
QPen linePen = mGuideItem->pen();
|
||||
// if guide preview is outside a page draw it a lot fainter, to indicate it's invalid
|
||||
if ( !layout->pageCollection()->pageAtPoint( displayPos ) )
|
||||
|
Loading…
x
Reference in New Issue
Block a user