<div dir="ltr">I had the exact same problem some time ago. The layers are present in the QgsProject, but not added to the QgsCanvas, so they don't appear in the Layer Panel but the entry is there in the Layer Styling Panel.<div>You can use PyQGIS to solve it<div>Here is a simple function that iters over the layers in the project, and removes the layers not present in the canvas:</div><div>  </div><div>def remove_odd_layers():<br>    for layer in QgsProject.instance().mapLayers().values():<br>        if layer not in iface.mapCanvas().layers():<br>            QgsProject.instance().removeMapLayer(layer)<br></div><div><br></div><div>

remove_odd_layers

()</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le dim. 23 août 2020 à 13:03, Jens Beutmann <<a href="mailto:beutmann@arcor.de">beutmann@arcor.de</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I got a problem with layers that are displayed in the layer design <br>
dialog ("Layergestaltung" in German) but not in the layer window itself. <br>
I would like to delete these layers but this is not possible. I opened <br>
the project in QGIS 2.18 and in 3.10 and it happens in both versions. <br>
Can anybody help?<br>
<br>
<br>
-- <br>
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.<br>
<a href="https://www.avast.com/antivirus" rel="noreferrer" target="_blank">https://www.avast.com/antivirus</a><br>
<br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><span><br><div dir="ltr" style="margin-left:0pt"><table style="border:none;border-collapse:collapse"><colgroup><col width="158"><col width="529"></colgroup><tbody><tr style="height:124pt"><td style="vertical-align:top;padding:5pt"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><a href="https://www.itlink.fr/" target="_blank"><span style="font-size:11pt;font-family:"Open Sans";color:rgb(17,85,204);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><img src="https://lh3.googleusercontent.com/WYaF3wmob-MGxieg6sbXGkwhWcBc-IEr5CV1W00gYx2_NKokveRsOhIspH1N1IMW6iUb3ha6XUgBNo0mxwlkIIABuzI2yqz7rwtSye9JK400YzNoemBV4P4CYmwr3szDtYzOhhX2" width="144" height="144" style="border: none;"></span></a></p></td><td style="vertical-align:top;padding:5pt"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14pt;font-family:Verdana;color:rgb(0,51,126);background-color:transparent;font-weight:700;vertical-align:baseline;white-space:pre-wrap"><br></span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14pt;font-family:Verdana;color:rgb(0,51,126);background-color:transparent;font-weight:700;vertical-align:baseline;white-space:pre-wrap">Yoann Quenach de Quivillic</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Verdana;color:rgb(35,149,244);background-color:transparent;font-weight:700;vertical-align:baseline;white-space:pre-wrap">Ingénieur d'étude</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Verdana;color:rgb(35,149,244);background-color:transparent;font-weight:700;vertical-align:baseline;white-space:pre-wrap"><br></span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><a href="https://www.itlink.fr/" target="_blank"><span style="font-size:10pt;font-family:Verdana;color:rgb(17,85,204);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">www.itlink.fr</span></a></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><br></p></td></tr></tbody></table></div></span></div></div></div></div>