Ejemplo n.º 1
0
 def _remove_prev_layer(self):
     """
     Removes previous temporary layer
     :return: None
     :rtype: None
     """
     if self.prev_temp_mem_layer and len(gpx_view.get_layer_by_name(self.temp_layer_name)) != 0:
         gpx_view.remove_vertex(self.map_canvas, self.prev_point_row_attr)
         gpx_view.remove_map_layer(self.map_canvas, self.prev_temp_mem_layer)
         return True
Ejemplo n.º 2
0
 def closeEvent(self, event):
     """
     Closes the import dialog when called
     :param event: Close event
     :return: None
     :rtype: None
     """
     if len(gpx_view.get_layer_by_name(self.temp_layer_name)) != 0:
         gpx_view.remove_vertex(self.map_canvas, self.point_row_attr)
         gpx_view.remove_map_layer(self.map_canvas, self.temp_mem_layer)
     if self.point_row_attr:
         self._refresh_map_canvas()
     event.accept()
Ejemplo n.º 3
0
    def closeEvent(self, event):
        """
        Closes the import dialog when called
        :param event: Close event
        :return: None
        :rtype: None
        """
        if len(gpx_view.get_layer_by_name(self.temp_layer_name)) != 0:
            gpx_view.remove_vertex(self.map_canvas, self.point_row_attr)
            gpx_view.remove_map_layer(self.map_canvas, self.temp_mem_layer)
        if self.point_row_attr:
            self._refresh_map_canvas()

        self.save_handler()