File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -210,11 +210,10 @@ def projectedModules(self):
210210 @property
211211 def projectedFits (self ):
212212 # only in extreme edge cases will the fit be invalid, but to be sure do
213- # not return them. By this time
213+ # not return them.
214214 return [fit for fit in self .__projectedFits .values () if not fit .isInvalid ]
215215
216216 def getProjectionInfo (self , fitID ):
217- print "get projection info for fitID: " , fitID
218217 return self .projectedOnto .get (fitID , None )
219218
220219 @property
@@ -967,6 +966,9 @@ def __deepcopy__(self, memo):
967966 c .append (deepcopy (i , memo ))
968967
969968 for fit in self .projectedFits :
970- copy .projectedFits .append (fit )
969+ copy .__projectedFits [fit .ID ] = fit
970+ # this bit is required -- see GH issue # 83
971+ eos .db .saveddata_session .flush ()
972+ eos .db .saveddata_session .refresh (fit )
971973
972974 return copy
Original file line number Diff line number Diff line change @@ -178,6 +178,11 @@ def deleteFit(self, fitID):
178178
179179 eos .db .remove (fit )
180180
181+ # refresh any fits this fit is projected onto. Otherwise, if we have
182+ # already loaded those fits, they will not reflect the changes
183+ for projection in fit .projectedOnto .values ():
184+ eos .db .saveddata_session .refresh (projection .victim_fit )
185+
181186 def copyFit (self , fitID ):
182187 fit = eos .db .getFit (fitID )
183188 newFit = copy .deepcopy (fit )
You can’t perform that action at this time.
0 commit comments