From 7751656ec7b05dfc33ee41ecb5309792d2163479 Mon Sep 17 00:00:00 2001 From: George O'Neill Date: Fri, 13 Oct 2023 14:58:07 +0200 Subject: [PATCH] small refactor --- nexus_constructor/field_widget.py | 1 - nexus_constructor/json/transformation_reader.py | 7 +------ ui/transformation.py | 7 ------- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/nexus_constructor/field_widget.py b/nexus_constructor/field_widget.py index b1925dc37..37ef461ee 100644 --- a/nexus_constructor/field_widget.py +++ b/nexus_constructor/field_widget.py @@ -123,7 +123,6 @@ def __init__( self.unit_validator = UnitValidator() self.units_line_edit.setValidator(self.unit_validator) self.units_line_edit.setMinimumWidth(20) - # self.units_line_edit.setMaximumWidth(50) unit_size_policy = QSizePolicy() unit_size_policy.setHorizontalPolicy(QSizePolicy.Preferred) unit_size_policy.setHorizontalStretch(1) diff --git a/nexus_constructor/json/transformation_reader.py b/nexus_constructor/json/transformation_reader.py index 20952edef..92ebd708a 100644 --- a/nexus_constructor/json/transformation_reader.py +++ b/nexus_constructor/json/transformation_reader.py @@ -30,7 +30,7 @@ create_fw_module_object, ) from nexus_constructor.model.transformation import Transformation -from nexus_constructor.model.value_type import VALUE_TYPE_TO_NP, ValueTypes +from nexus_constructor.model.value_type import VALUE_TYPE_TO_NP from nexus_constructor.transformations_list import TransformationsList TRANSFORMATION_MAP = { @@ -342,11 +342,6 @@ def _create_transformations(self, json_transformations: list): values=values, offset_vector=QVector3D(*offset_vector), ) - # offset = self._find_attribute_in_list(CommonAttrs.OFFSET, name, attributes) - # if offset: - # transform.attributes.set_attribute_value( - # CommonAttrs.OFFSET, offset, ValueTypes.FLOAT - # ) if depends_on not in DEPENDS_ON_IGNORE: depends_on_id = TransformId( *get_component_and_transform_name(depends_on) diff --git a/ui/transformation.py b/ui/transformation.py index 12eaeeb97..b9ea8db5b 100644 --- a/ui/transformation.py +++ b/ui/transformation.py @@ -57,17 +57,10 @@ def setup_ui(self, transformation): self.ui_placeholder_layout = QVBoxLayout() - # self.offset_box = QDoubleSpinBox(transformation) - # self.offset_box.setToolTip("Offset to the transformation.") - # self.offset_box.setMinimumWidth(100) - # self.offset_box.setMinimum(-1000) - # self.offset_box.setDecimals(5) offset_font = QFont() offset_font.setBold(True) self.offset_label = QLabel("Offset") self.offset_label.setFont(offset_font) - # self.ui_placeholder_layout.addWidget(self.offset_label) - # self.ui_placeholder_layout.addWidget(self.offset_box) self.depends_on_text_box = QLineEdit(transformation) self.depends_on_text_box.setToolTip("depends_on for transformation.")