Skip to content

Fixes for crashes in the app #243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion EasyReflectometryApp/Backends/Py/logic/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from easyreflectometry import Project as ProjectLib
from easyreflectometry.sample import LayerAreaPerMolecule
from easyreflectometry.sample import LayerCollection
from easyreflectometry.sample import Material


class Layers:
Expand Down Expand Up @@ -42,7 +43,7 @@ def remove_at_index(self, value: str) -> None:

def add_new(self) -> None:
if 'Si' not in [material.name for material in self._project_lib._materials]:
self._project_lib._materials.add_material('Si', 2.07, 0.0)
self._project_lib._materials.add_material(Material(name='Si', sld=2.07, isld=0.0))
index_si = [material.name for material in self._project_lib._materials].index('Si')
self._layers.add_layer()
self._layers[-1].material = self._project_lib._materials[index_si]
Expand Down
1 change: 0 additions & 1 deletion EasyReflectometryApp/Backends/Py/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ def setCurrentModelIndex(self, new_value: int) -> None:
self._project_lib.current_model_index = new_value
self.modelsIndexChanged.emit()
self.assembliesTableChanged.emit()
self._clearCacheAndEmitLayersChanged()
self.externalRefreshPlot.emit()

@Slot(str)
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ dependencies = [
ci = [
'pyinstaller',
'licensename',
'dephell_licenses'
'dephell_licenses',
'charset-normalizer<3.2',
]

docs = [
Expand Down