Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions app/activeproject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,16 @@ bool ActiveProject::recordingAllowed( QgsMapLayer *layer ) const
if ( layer->readOnly() )
return false;

if ( layer )

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this condition is always true

{
bool isPrivate = layer->flags() & QgsMapLayer::LayerFlag::Private;

if ( isPrivate )
{
return false;
}
}

return QgsMapLayerProxyModel::layerMatchesFilters( layer, Qgis::LayerFilter::HasGeometry | Qgis::LayerFilter::WritableLayer ) && layer->id() != positionTrackingLayerId() && layer->id() != mapSketchesLayerId();
}

Expand Down
10 changes: 10 additions & 0 deletions app/recordinglayersproxymodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ bool RecordingLayersProxyModel::filterAcceptsRow( int source_row, const QModelIn
QModelIndex index = mModel->index( source_row, 0, source_parent );
QgsMapLayer *layer = mModel->layerFromIndex( index );

if ( layer )
{
bool isPrivate = layer->flags() & QgsMapLayer::LayerFlag::Private;

if ( isPrivate )
{
return false;
}
}

return mModel->data( index, LayersModel::LayerVisible ).toBool();
}

Expand Down
Loading