mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Finish wiring up SAM orientation control.
The UI works beautifully, but that's not worth much if it doesn't actually change the data... Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2479.
This commit is contained in:
parent
418d78f99b
commit
889e1f5da2
@ -163,8 +163,8 @@ class QGroundObjectMenu(QDialog):
|
||||
self.orientationBox = QGroupBox("Orientation :")
|
||||
self.orientationBoxLayout = QHBoxLayout()
|
||||
|
||||
heading_image = HeadingIndicator(self.ground_object.heading, self)
|
||||
self.orientationBoxLayout.addWidget(heading_image)
|
||||
self.heading_image = HeadingIndicator(self.ground_object.heading, self)
|
||||
self.orientationBoxLayout.addWidget(self.heading_image)
|
||||
self.headingLabel = QLabel("Heading:")
|
||||
self.orientationBoxLayout.addWidget(self.headingLabel)
|
||||
self.headingSelector = QSpinBox()
|
||||
@ -174,7 +174,7 @@ class QGroundObjectMenu(QDialog):
|
||||
self.headingSelector.setSingleStep(5)
|
||||
self.headingSelector.setValue(self.ground_object.heading.degrees)
|
||||
self.headingSelector.valueChanged.connect(
|
||||
lambda degrees: heading_image.set_heading(Heading(degrees))
|
||||
lambda degrees: self.rotate_tgo(Heading(degrees))
|
||||
)
|
||||
self.orientationBoxLayout.addWidget(self.headingSelector)
|
||||
if self.cp.captured:
|
||||
@ -184,7 +184,7 @@ class QGroundObjectMenu(QDialog):
|
||||
or self.ground_object.heading
|
||||
)
|
||||
self.head_to_conflict_button.clicked.connect(
|
||||
lambda: self.rotate_tgo(heading)
|
||||
lambda: self.headingSelector.setValue(heading.degrees)
|
||||
)
|
||||
self.orientationBoxLayout.addWidget(self.head_to_conflict_button)
|
||||
else:
|
||||
@ -250,7 +250,7 @@ class QGroundObjectMenu(QDialog):
|
||||
|
||||
def rotate_tgo(self, heading: Heading) -> None:
|
||||
self.ground_object.rotate(heading)
|
||||
self.do_refresh_layout()
|
||||
self.heading_image.set_heading(heading)
|
||||
|
||||
def sell_all(self):
|
||||
self.update_total_value()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user