Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…tionBeta into easycore
  • Loading branch information
rozyczko committed Dec 26, 2023
2 parents 3196087 + b66e02e commit 5c3a6e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions easyDiffractionApp/Logic/Model.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,15 +505,16 @@ def removeModel(self, index):
currentDataBlock = self.dataBlocks[index]
currentModelName = currentDataBlock['name']['value']

self._interface.remove_phase(currentModelName) # delete phase info on interface
# self._interface.remove_phase(currentModelName) # delete phase info on interface
self._interface.remove_phase(phases_obj=self.phases, phase_obj=self.phases[self.currentIndex])
self.removePhase(currentModelName) # delete phase locally
del self._dataBlocks[index]

self.defined = bool(len(self.dataBlocks))
if not self.defined:
self._currentIndex = -1

self.dataBlocksChanged.emit()
# self.dataBlocksChanged.emit()
console.debug(f"Model no. {index + 1} has been removed")

@Slot()
Expand Down

0 comments on commit 5c3a6e7

Please sign in to comment.