Filtered out the bad entities from the ship before the load condition generation

This commit is contained in:
Jose Luis Cercos Pita 2015-10-16 13:43:04 +02:00
parent 1d00b9f250
commit 1f74c1d413

View File

@ -85,6 +85,10 @@ def load():
s.set("B3", ship.Name)
s.setForeground('A1:B3', (0.5,0.5,0.5))
# Clean the Ship instance before generating the load condition
ship.Proxy.cleanWeights(ship)
ship.Proxy.cleanTanks(ship)
# Add the weights data
s.mergeCells('A4:D4')
s.setAlignment('A4:A4', 'center', 'keep')
@ -125,8 +129,6 @@ def load():
lcs = ship.LoadConditions[:]
lcs.append(s.Name)
ship.LoadConditions = lcs
ship.Proxy.cleanWeights(ship)
ship.Proxy.cleanTanks(ship)
ship.Proxy.cleanLoadConditions(ship)
# Recompute to take the changes