Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add a debug assert relating to multiframe item crashes
- Loading branch information
|
@@ -163,6 +163,7 @@ void QgsLayoutFrame::draw( QgsRenderContext &context, const QStyleOptionGraphics |
|
|
{ |
|
|
//calculate index of frame |
|
|
int frameIndex = mMultiFrame->frameIndex( this ); |
|
|
Q_ASSERT_X( frameIndex >= 0, "QgsLayoutFrame::draw", "Invalid frame index for frame" ); |
|
|
mMultiFrame->render( context, mSection, frameIndex, itemStyle ); |
|
|
} |
|
|
} |
|
|
|
@@ -540,6 +540,7 @@ QgsExpressionContext QgsLayoutItemAttributeTable::createExpressionContext() cons |
|
|
|
|
|
void QgsLayoutItemAttributeTable::finalizeRestoreFromXml() |
|
|
{ |
|
|
QgsLayoutTable::finalizeRestoreFromXml(); |
|
|
if ( !mMap && !mMapUuid.isEmpty() && mLayout ) |
|
|
{ |
|
|
mMap = qobject_cast< QgsLayoutItemMap *>( mLayout->itemByUuid( mMapUuid, true ) ); |
|
|
|
@@ -54,7 +54,7 @@ double QgsLayoutMultiFrame::findNearbyPageBreak( double yPos ) |
|
|
|
|
|
void QgsLayoutMultiFrame::addFrame( QgsLayoutFrame *frame, bool recalcFrameSizes ) |
|
|
{ |
|
|
if ( !frame ) |
|
|
if ( !frame || mFrameItems.contains( frame ) ) |
|
|
return; |
|
|
|
|
|
mFrameItems.push_back( frame ); |
|
|