Skip to content

Commit d0ed351

Browse files
authored
Merge pull request #1730 from tobias74/fix/multiselect-no-llh
Editor: hide LLH/ECEF/ESU rows for multi-selection in Globe Anchor Details (prevents unintended writes/teleport)
2 parents 1d61f76 + 2aab7ff commit d0ed351

File tree

2 files changed

+36
-5
lines changed

2 files changed

+36
-5
lines changed

CHANGES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log {#changes}
22

3+
### ? - ?
4+
5+
##### Fixes :wrench:
6+
7+
- Fixed a problem where multi-selecting `UCesiumGlobeAnchorComponent` could cause the selected components to teleport to 0 degrees longitude and 0 degrees latitude. Now, the geospatial position and orientation fields are hidden while multi-selecting.
8+
39
### v2.20.0 - 2025-10-01
410

511
##### Additions :tada:

Source/CesiumEditor/Private/CesiumGlobeAnchorCustomization.cpp

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77
#include "CesiumGlobeAnchorComponent.h"
88
#include "DetailCategoryBuilder.h"
99
#include "DetailLayoutBuilder.h"
10+
#include "DetailWidgetRow.h"
1011
#include "IDetailGroup.h"
1112
#include "Widgets/SToolTip.h"
13+
#include "Widgets/Text/STextBlock.h"
14+
15+
#define LOCTEXT_NAMESPACE "CesiumGlobeAnchorCustomization"
1216

1317
FName FCesiumGlobeAnchorCustomization::RegisteredLayoutName;
1418

@@ -36,6 +40,7 @@ FCesiumGlobeAnchorCustomization::MakeInstance() {
3640
void FCesiumGlobeAnchorCustomization::CustomizeDetails(
3741
IDetailLayoutBuilder& DetailBuilder) {
3842
DetailBuilder.GetObjectsBeingCustomized(this->SelectedObjects);
43+
const bool bIsMultiSelect = this->SelectedObjects.Num() > 1;
3944

4045
IDetailCategoryBuilder& CesiumCategory = DetailBuilder.EditCategory("Cesium");
4146

@@ -67,11 +72,29 @@ void FCesiumGlobeAnchorCustomization::CustomizeDetails(
6772
UCesiumGlobeAnchorComponent,
6873
TeleportWhenUpdatingTransform));
6974

70-
this->UpdateDerivedProperties();
71-
72-
this->CreatePositionLongitudeLatitudeHeight(DetailBuilder, CesiumCategory);
73-
this->CreatePositionEarthCenteredEarthFixed(DetailBuilder, CesiumCategory);
74-
this->CreateRotationEastSouthUp(DetailBuilder, CesiumCategory);
75+
if (!bIsMultiSelect) {
76+
this->UpdateDerivedProperties();
77+
this->CreatePositionLongitudeLatitudeHeight(DetailBuilder, CesiumCategory);
78+
this->CreatePositionEarthCenteredEarthFixed(DetailBuilder, CesiumCategory);
79+
this->CreateRotationEastSouthUp(DetailBuilder, CesiumCategory);
80+
} else {
81+
FDetailWidgetRow& Row =
82+
CesiumCategory
83+
.AddCustomRow(
84+
LOCTEXT("MultipleSelectionFilter", "Multiple Selection"))
85+
.FilterString(LOCTEXT(
86+
"MultipleSelectionFilters",
87+
"Latitude Longitude Height ECEF ESU"));
88+
89+
Row.WholeRowContent()[SNew(SBox).Padding(FMargin(
90+
0.f,
91+
4.f))[SNew(STextBlock)
92+
.Text(LOCTEXT(
93+
"MultiSelectInfo",
94+
"Multiple actors selected. Geodetic position (Latitude, Longitude, Height; ECEF) and "
95+
"ESU rotation cannot be edited in multi-select. Select a single actor to edit these values."))
96+
.AutoWrapText(true)]];
97+
}
7598
}
7699

77100
void FCesiumGlobeAnchorCustomization::CreatePositionEarthCenteredEarthFixed(
@@ -296,3 +319,5 @@ TStatId UCesiumGlobeAnchorDerivedProperties::GetStatId() const {
296319
UCesiumGlobeAnchorRotationEastSouthUp,
297320
STATGROUP_Tickables);
298321
}
322+
323+
#undef LOCTEXT_NAMESPACE

0 commit comments

Comments
 (0)