Skip to content

Commit

Permalink
V1.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
jhemmi committed Feb 1, 2021
1 parent b65dcfc commit adf0995
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
Binary file added data/MesIAE.gpkg
Binary file not shown.
Binary file modified data/MonParcellaire.gpkg
Binary file not shown.
Binary file modified data/MonParcellaire.qgz
Binary file not shown.
1 change: 1 addition & 0 deletions data/jointure.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ NG15;NG;A018; planté 2014
GA02;GA;A019;
JU02;JU;A020;oh
NG16;NG;A07;arraché

2 changes: 1 addition & 1 deletion initialisation_var_exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
# NOM du GPKG et de ses tables
MonParcellaire_GPKG=APPLI_NOM + EXT_gpkg
MesFondsDePlan_GPKG="MesFondsDePlan" + EXT_gpkg
MesIAE_GPKG="MesIEA" + EXT_gpkg
MesIAE_GPKG="MesIAE" + EXT_gpkg
GPKG_LAYERNAME = SEP_PIPE + "layername="
# Noms tables gpkg
MonParcellaire_ROU="routes"
Expand Down
2 changes: 1 addition & 1 deletion metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repository=https://github.com/jhemmi/MonParcellaire
hasProcessingProvider=no
# Uncomment the following line and add your changelog:
changelog=
V1.2.6 Gestion des cas d'encodages de jointure et modele referentiel en L93
V1.2.6 Gestion des cas d'encodages de jointure, modele referentiel en L93 et mesIEA.gpkg
V1.2.5 Sauvegarde jointure et projet
V1.1 GPKGs jointure & impression & documents

Expand Down
19 changes: 11 additions & 8 deletions mon_parcellaire_dockwidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def __init__(self, parent=None):
nomColonnes=['Pas de jointure']
nomColonnesUniques=['Pas de jointure']
# Attributs pour la joindre
self.initialiserCombo( self.AttributJointure_comboBox, nomColonnesUniques, ATTRIBUT_JOINTURE, "attribut pour jointure")
self.initialiserCombo( self.AttributJointure_comboBox, nomColonnesUniques, ATTRIBUT_JOINTURE)
# Liste AttributsAJoindre
self.initialiserListeMultiple( self.AttributsAJoindre_listWidget, nomColonnes, LISTE_ATTRIBUTS_A_JOINDRE, "attributs à joindre")
# Cas où jointure est attendu mais n'existe pas (ou plus)
Expand Down Expand Up @@ -242,7 +242,7 @@ def slotBasculeJointure( self):
self.label_AttributsAJoindre.setEnabled( True)
nomColonnes, nomColonnesUniques = self.lireAttributsJointure( CHEMIN_JOINTURE)
# Attributs pour la joindre
self.initialiserCombo( self.AttributJointure_comboBox, nomColonnesUniques, ATTRIBUT_JOINTURE, "attribut pour jointure")
self.initialiserCombo( self.AttributJointure_comboBox, nomColonnesUniques, ATTRIBUT_JOINTURE)
# Liste AttributsAJoindre
self.initialiserListeMultiple( self.AttributsAJoindre_listWidget, nomColonnes, LISTE_ATTRIBUTS_A_JOINDRE, "attributs à joindre")
else:
Expand All @@ -252,16 +252,17 @@ def slotBasculeJointure( self):
self.label_Jointure.setEnabled( False)
self.label_AttributJointure.setEnabled( False)
self.label_AttributsAJoindre.setEnabled( False)
self.initialiserCombo( self.AttributJointure_comboBox, ["Pas de jointure"], "Pas de jointure", "attribut pour jointure")
self.initialiserCombo( self.AttributJointure_comboBox, ["Pas de jointure"], "Pas de jointure")
self.initialiserListeMultiple( self.AttributsAJoindre_listWidget, ["Pas de jointure"], ["Pas de jointure"], "attributs à joindre")

def initialiserCombo( self, comboAInitialiser, LISTE_VALEURS, UNE_VALEUR, libelleErreur):
def initialiserCombo( self, comboAInitialiser, LISTE_VALEURS, UNE_VALEUR, libelleErreur=None):
"""Initialise un combo avec une liste de valeur et avec la position de la valeur correspondante trouvé dans Settings
"""
comboAInitialiser.setCurrentIndex( 0)
if len( LISTE_VALEURS) == 0:
comboAInitialiser.clear( )
monPrint( self.tr("Pas de liste {0} pré défini".format( libelleErreur)), T_WAR, "BAR", self)
comboAInitialiser.clear()
if libelleErreur != None:
monPrint( self.tr("Pas de liste {0} pré défini".format( libelleErreur)), T_WAR, "BAR", self)
else:
comboAInitialiser.clear( )
comboAInitialiser.addItems( LISTE_VALEURS )
Expand Down Expand Up @@ -496,8 +497,10 @@ def lireAttributsJointure(self, CHEMIN_JOINTURE):
# Sans Pandas : mode dégradé pas de recherche des uniques
nomColonnesUniques = nomColonnes
if nomColonnesUniques == []:
monPrint("Aucun colonne de cette jointure n'est unique: jointure impossible", T_ERR)
#TODO: Décocher le choix de jointure
monPrint("Aucun attribut de cette jointure n'est unique: jointure impossible", T_ERR)
monPrint("Aucun attribut de cette jointure n'est unique: jointure impossible", T_ERR, T_BAR, self)
# Décocher le choix de jointure
self.Jointure_checkBox.setChecked( Qt.Unchecked)
return nomColonnes, nomColonnesUniques

def slotTraiterRepertoireGPKGJointure( self):
Expand Down

0 comments on commit adf0995

Please sign in to comment.