mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-24 04:58:59 -05:00
More coding style conformance
This commit is contained in:
@@ -253,7 +253,8 @@ void ControlWidget::onDateChange() {
|
||||
QString script =
|
||||
"openspace.time.setTime('" + date + "');\
|
||||
openspace.setPropertyValue('Interaction.origin', '" + focus + "');\
|
||||
openspace.setPropertyValue('Interaction.coordinateSystem', '" + coordinateSystem + "')";
|
||||
openspace.setPropertyValue('Interaction.coordinateSystem', '" +
|
||||
coordinateSystem + "')";
|
||||
emit scriptActivity(script);
|
||||
}
|
||||
_setTime->blockSignals(true);
|
||||
@@ -265,18 +266,28 @@ void ControlWidget::onFocusChange() {
|
||||
int index = _focusNode->currentIndex();
|
||||
QString name = FocusNodes[index].name;
|
||||
QString coordinateSystem = FocusNodes[index].coordinateSystem;
|
||||
QString script = "openspace.setPropertyValue('Interaction.origin', '" + name + "');openspace.setPropertyValue('Interaction.coordinateSystem', '" + coordinateSystem + "');";
|
||||
QString script = "openspace.setPropertyValue('Interaction.origin', '" + name +
|
||||
"');openspace.setPropertyValue('Interaction.coordinateSystem', '" +
|
||||
coordinateSystem + "');";
|
||||
emit scriptActivity(script);
|
||||
}
|
||||
|
||||
void ControlWidget::onFocusToTargetButton() {
|
||||
std::string target = reinterpret_cast<MainWindow*>(parent())->nextTarget();
|
||||
if (!target.empty()) {
|
||||
auto it = std::find_if(std::begin(FocusNodes), std::end(FocusNodes), [target](const FocusNode& n) { return n.guiName.toLower() == QString::fromStdString(target).toLower(); });
|
||||
auto it = std::find_if(
|
||||
std::begin(FocusNodes),
|
||||
std::end(FocusNodes),
|
||||
[target](const FocusNode& n) {
|
||||
return n.guiName.toLower() == QString::fromStdString(target).toLower();
|
||||
});
|
||||
if (it != std::end(FocusNodes)) {
|
||||
QString name = it->name;
|
||||
QString coordinateSystem = it->coordinateSystem;
|
||||
QString script = "openspace.setPropertyValue('Interaction.origin', '" + name + "');openspace.setPropertyValue('Interaction.coordinateSystem', '" + coordinateSystem + "');";
|
||||
QString script =
|
||||
"openspace.setPropertyValue('Interaction.origin', '" + name +
|
||||
"');openspace.setPropertyValue('Interaction.coordinateSystem', '" +
|
||||
coordinateSystem + "');";
|
||||
emit scriptActivity(script);
|
||||
}
|
||||
}
|
||||
@@ -292,7 +303,9 @@ void ControlWidget::onFocusToNewHorizonsButton() {
|
||||
else
|
||||
coordinateSystem = "Pluto";
|
||||
|
||||
QString script = "openspace.setPropertyValue('Interaction.origin', 'NewHorizons');openspace.setPropertyValue('Interaction.coordinateSystem', '" + coordinateSystem + "');";
|
||||
QString script = "openspace.setPropertyValue('Interaction.origin', 'NewHorizons');\
|
||||
openspace.setPropertyValue('Interaction.coordinateSystem', '" + coordinateSystem +
|
||||
"');";
|
||||
emit scriptActivity(script);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user