Skip to content
Snippets Groups Projects

Fixed save/load, sfg creating, simulation, bug fixes

Merged Jacob Wahlman requested to merge gui-bug-fixes into develop
1 file
+ 9
2
Compare changes
  • Side-by-side
  • Inline
@@ -22,11 +22,15 @@ class PropertiesWindow(QDialog):
self.vertical_layout = QVBoxLayout()
self.vertical_layout.addLayout(self.name_layout)
if hasattr(self.operation.operation, "value"):
if hasattr(self.operation.operation, "value") or hasattr(self.operation.operation, "initial_value"):
self.constant_layout = QHBoxLayout()
self.constant_layout.setSpacing(50)
self.constant_value = QLabel("Value:")
self.edit_constant = QLineEdit(str(self.operation.operation.value))
if hasattr(self.operation.operation, "value"):
self.edit_constant = QLineEdit(str(self.operation.operation.value))
else:
self.edit_constant = QLineEdit(str(self.operation.operation.initial_value))
self.only_accept_float = QDoubleValidator()
self.edit_constant.setValidator(self.only_accept_float)
self.constant_layout.addWidget(self.constant_value)
@@ -126,6 +130,9 @@ class PropertiesWindow(QDialog):
self.operation.label.setPlainText(self.operation.name)
if hasattr(self.operation.operation, "value"):
self.operation.operation.value = float(self.edit_constant.text().replace(",", "."))
elif hasattr(self.operation.operation, "initial_value"):
self.operation.operation.initial_value = float(self.edit_constant.text().replace(",", "."))
if self.check_show_name.isChecked():
self.operation.label.setOpacity(1)
self.operation.is_show_name = True
Loading