Skip to content

Commit

Permalink
selection bug resolved
Browse files Browse the repository at this point in the history
selection was not used if mor than 500 objects
  • Loading branch information
Régis Haubourg committed Feb 14, 2014
1 parent 1c5e4fa commit 23fee7f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
13 changes: 9 additions & 4 deletions EasyCustomLabeling/EasyCustomLabeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,10 @@ def runLabel(self):
self.iface.mapCanvas().freeze(0)
# print 'dialog keep selection: ' + str(ret)
return
# elif ret == 65536 : # No button65536 use entire layer

#elif ret == 16384 :
elif ret == 65536 : # No button65536 use entire layer
print 'use entire layer'
elif ret == 16384 :
print 'use selection'


nbSelectedObjects = sourceLayer.selectedFeatureCount()
Expand All @@ -391,8 +392,12 @@ def runLabel(self):
msgBox.setText(QtGui.QApplication.translate("EasyCustomLabeling","Your layer contains many objects. Continue anyway?", None, QtGui.QApplication.UnicodeUTF8))
msgBox.setStandardButtons(QMessageBox.Ok | QMessageBox.Cancel)
msgBox.setDefaultButton(QMessageBox.Ok) # This function was introduced in Qt 4.3.
ret = msgBox.exec_() #ret_val = 1024 si OK, 4194304 sinon
ret2 = msgBox.exec_() #ret_val = 1024 si OK, 4194304 sinon
# print 'dialog many objects: ' + str(ret)
if ret2 != 1024:
print 'user cancel on too many object question'
return




Expand Down
Binary file modified EasyCustomLabeling/i18n/EasyCustomLabeling_fr.qm
Binary file not shown.
6 changes: 3 additions & 3 deletions EasyCustomLabeling/i18n/EasyCustomLabeling_fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ Cliquer sur la couche vectorielle à étiqueter</translation>
<message numerus="yes">
<location filename="EasyCustomLabeling.py" line="276"/>
<source>Use %n selected object(s) only for labeling ?</source>
<translation>
<numerusform>Créer une couche uniquement avec le(s) %n objets(s) sélectionné(s)?</numerusform>
<numerusform></numerusform>
<translation type="unfinished">
<numerusform>Utilisez uniquement %n objet sélectionné ? </numerusform>
<numerusform>Utilisez uniquement les %n objets sélectionnés ? </numerusform>
</translation>
</message>
</context>
Expand Down
Binary file modified EasyCustomLabeling/i18n/EasyCustomLabeling_fr_FR.qm
Binary file not shown.

0 comments on commit 23fee7f

Please sign in to comment.