Skip to content

Commit

Permalink
Merge pull request #173 from opengisch/disconnect_offline_editing
Browse files Browse the repository at this point in the history
Disconnect from offline editing when tasks done
  • Loading branch information
suricactus authored Aug 21, 2020
2 parents 142b758 + d3cdd88 commit 0eb45fc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions qfieldsync/core/offline_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ def convert(self):
QgsProject.instance().setFileName(original_project_path)
QApplication.restoreOverrideCursor()

self.offline_editing.layerProgressUpdated.disconnect(self.on_offline_editing_next_layer)
self.offline_editing.progressModeSet.disconnect(self.on_offline_editing_max_changed)
self.offline_editing.progressUpdated.disconnect(self.offline_editing_task_progress)

self.total_progress_updated.emit(100, 100, self.tr('Finished'))

def createBaseMapLayer(self, map_theme, layer, tile_size, map_units_per_pixel):
Expand Down
4 changes: 4 additions & 0 deletions qfieldsync/gui/synchronize_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,8 @@ def update_mode(self, _, mode_count):

@pyqtSlot()
def update_done(self):
self.offline_editing.progressStopped.disconnect(self.update_done)
self.offline_editing.layerProgressUpdated.disconnect(self.update_total)
self.offline_editing.progressModeSet.disconnect(self.update_mode)
self.offline_editing.progressUpdated.disconnect(self.update_value)
self.offline_editing_done = True

0 comments on commit 0eb45fc

Please sign in to comment.