Skip to content

Commit

Permalink
Fix for Missing DCE layers in RS Viewer #539
Browse files Browse the repository at this point in the history
  • Loading branch information
KellyMWhitehead authored and philipbaileynar committed Dec 6, 2024
1 parent b9fc95b commit 635d3d0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/view/frm_export_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QMessageBox
from qgis.core import QgsVectorLayer, QgsMessageLog
from qgis.utils import iface

from rsxml.project_xml import Project, MetaData, Meta, ProjectBounds, Coords, BoundingBox, Realization, Geopackage, GeopackageLayer, GeoPackageDatasetTypes, Dataset

Expand Down Expand Up @@ -279,6 +280,10 @@ def accept(self) -> None:
# copy the geopackage layers to the new project folder
out_name = 'qris.gpkg' # os.path.split(self.qris_project.project_file)[1]
out_geopackage = os.path.abspath(os.path.join(self.txt_outpath.text(), out_name).replace("\\", "/"))

# Refrfesh the map canvas to ensure all layers are flushed to disk before copying
iface.mapCanvas().refreshAllLayers()

shutil.copy(self.qris_project.project_file, out_geopackage)

# Project Bounds
Expand Down

0 comments on commit 635d3d0

Please sign in to comment.