Skip to content

Commit

Permalink
bugfix fenetre lien
Browse files Browse the repository at this point in the history
  • Loading branch information
cedrick-f committed May 15, 2020
1 parent cddcb20 commit 2a9f83a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/lien.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,10 +396,10 @@ def __init__(self, parent, lien, pathref):
box.Add(url, 1, wx.ALIGN_CENTRE|wx.ALL, 5)
self.url = url

sizer.Add(box, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5)
sizer.Add(box, 0, wx.GROW|wx.ALL, 5)

line = wx.StaticLine(self, -1, size=(20,-1), style=wx.LI_HORIZONTAL)
sizer.Add(line, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.RIGHT|wx.TOP, 5)
sizer.Add(line, 0, wx.GROW|wx.RIGHT|wx.TOP, 5)

btnsizer = wx.StdDialogButtonSizer()

Expand All @@ -417,7 +417,7 @@ def __init__(self, parent, lien, pathref):
btnsizer.AddButton(btn)
btnsizer.Realize()

sizer.Add(btnsizer, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5)
sizer.Add(btnsizer, 0,wx.ALL, 5)

self.SetSizer(sizer)
sizer.Fit(self)
Expand Down
19 changes: 10 additions & 9 deletions src/objects_wx.py
Original file line number Diff line number Diff line change
Expand Up @@ -1170,15 +1170,16 @@ def MiseAJourMenu(self):

#############################################################################
def MiseAJourToolBar(self):
fenDoc = self.GetCurrentPage()
if fenDoc is not None and fenDoc.typ == 'prg': #and hasattr(fenDoc, 'progression')
coderef = fenDoc.progression.GetReferentiel().Code
# print " ", coderef
btnPrj = self.GetBoutonToolBar(fenDoc.typ, 73)
if btnPrj is not None:
# print " ", REFERENTIELS[coderef].projets
btnPrj.Enable(len(REFERENTIELS[coderef].projets) > 0)
self.tb.Realize()
return
# fenDoc = self.GetCurrentPage()
# if fenDoc is not None and fenDoc.typ == 'prg': #and hasattr(fenDoc, 'progression')
# coderef = fenDoc.progression.GetReferentiel().Code
# # print " ", coderef
# btnPrj = self.GetBoutonToolBar(fenDoc.typ, 73)
# if btnPrj is not None:
# # print " ", REFERENTIELS[coderef].projets
# btnPrj.Enable(len(REFERENTIELS[coderef].projets) > 0)
# self.tb.Realize()

#############################################################################
def DefinirOptions(self, options):
Expand Down
9 changes: 9 additions & 0 deletions src/pysequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -7697,9 +7697,18 @@ def __eq__(self, lien):
######################################################################################
def __lt__(self, doc):
""" utilisé pour la fonction .sort() dans Progression.Ordonner()
None est plus petit que tout
"""

doc0 = self.GetDoc()
if doc0 is None:
return True

doc1 = doc.GetDoc()
if doc1 is None:
return False


#print(doc0, "<", doc1, "?")
if doc0.position[0] == doc1.position[0]:
dp0 = doc0.position[1]-doc0.position[0]
Expand Down

0 comments on commit 2a9f83a

Please sign in to comment.