You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
Régis Haubourg
committed
Version 1.0
publication version 1.
First stable version with full functions working
- activates callout modifications even after project load with Memory
Layer plugin On
- solves NoneType errors on project closing when some uncommited edits
remain
iface.messageBar().pushMessage("Error", QtGui.QApplication.translate("EasyCustomLabeling", "Current active layer is not a vector layer. \n Please click on the vector layer you need to label", None, QtGui.QApplication.UnicodeUTF8), level=0, duration=3)
labelFields=labelLayerProvider.fields() # replace labelFields with source FIELDS + labelingFields
398
463
399
464
# iterate objects of layer to load new destination labelLayerProvider
400
-
print'start loop on source layer attributes'
465
+
# print 'start loop on source layer attributes'
401
466
402
467
ifret==16384 :
403
468
selectedFeatures=sourceLayer.selectedFeatures()
@@ -430,6 +495,7 @@ def runLabel(self):
430
495
labelFeature['LblShow'] =1
431
496
labelFeature['LblSize'] =9
432
497
labelFeature['LblAShow'] =1
498
+
labelFeature['LblAlignV'] ='Half'
433
499
434
500
# displayFieldName = sourceLayer.displayField()
435
501
# if displayFieldName :
@@ -506,7 +572,7 @@ def runLabel(self):
506
572
iface.messageBar().pushMessage("Avertissement", QtGui.QApplication.translate("EasyCustomLabeling", "Turn on editing mode on label layer to start customizing labels"), level=0, duration=3)
507
573
508
574
except:
509
-
print'runLabel exception loop '
575
+
# print 'runLabel exception loop '
510
576
# if sourceLayer and not keepUserSelection :
511
577
# sourceLayer.removeSelection()
512
578
raise
@@ -519,8 +585,8 @@ def runLabel(self):
519
585
self.iface.mapCanvas().freeze(0)
520
586
self.iface.mapCanvas().refresh()
521
587
522
-
#QMessageBox.warning( None, "Avertissement", 'Pensez a enregistrer les editions de votre couche d étiquettes avant de quitter')
523
-
print'end of runlabel Action'
588
+
#QMessageBox.warning( None, "Avertissement", 'Pensez a enregistrer les editions de votre couche d étiquettes avant de quitter')
589
+
# print 'end of runlabel Action'
524
590
525
591
defrunAbout(self):
526
592
#QMessageBox.about(None, QtGui.QApplication.translate("EasyCustomLabeling", "texte about", None, QtGui.QApplication.UnicodeUTF8), QtGui.QApplication.translate("EasyCustomLabeling", "<strong>Easy custom labeling v. 0.4, Regis Haubourg (AEAG) - 2012. \n \n Action 1:This plugin duplicate a layer, transforming geometries into centroids, \n and adds all required fields for custom labeling. \n \n Action 2 - Arrow function draws lines between label and original object \n \n WARNING! This plugin requires to use Memory Layer Saver plugin if you want to save labels with project. \n Plugin memory layer saver 2.0 or higher is needed because of new gml behaviour (GDAL 1.9) \n \n Please send bugs or features requests here : http://hub.qgis.org/projects/easycustomlabeling </strong>", None, QtGui.QApplication.UnicodeUTF8))
0 commit comments