Skip to content
Snippets Groups Projects
Commit ea2af558 authored by Benjamin Jakimow's avatar Benjamin Jakimow
Browse files

improved SpatialPoint printing

parent cd751584
No related branches found
No related tags found
No related merge requests found
...@@ -184,7 +184,12 @@ class SpatialPoint(QgsPointXY): ...@@ -184,7 +184,12 @@ class SpatialPoint(QgsPointXY):
return self.__repr__() return self.__repr__()
def __repr__(self): def __repr__(self):
return '{} {} {}'.format(self.x(), self.y(), self.crs().authid())
if self.crs().mapUnits() == QgsUnitTypes.DistanceDegrees:
return '{:.1f} {:.1f} {}'.format(self.x(), self.y(), self.crs().authid())
else:
return '{:.5f} {:.5f} {:}'.format(self.x(), self.y(), self.crs().authid())
def findParent(qObject, parentType, checkInstance = False): def findParent(qObject, parentType, checkInstance = False):
...@@ -731,7 +736,6 @@ def loadUIFormClass(pathUi, from_imports=False, resourceSuffix=''): ...@@ -731,7 +736,6 @@ def loadUIFormClass(pathUi, from_imports=False, resourceSuffix=''):
#load form class #load form class
try: try:
FORM_CLASS, _ = uic.loadUiType(buffer, resource_suffix=RC_SUFFIX) FORM_CLASS, _ = uic.loadUiType(buffer, resource_suffix=RC_SUFFIX)
except SyntaxError as ex: except SyntaxError as ex:
FORM_CLASS, _ = uic.loadUiType(pathUi, resource_suffix=RC_SUFFIX) FORM_CLASS, _ = uic.loadUiType(pathUi, resource_suffix=RC_SUFFIX)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment