Skip to content

Commit cf89f73

Browse files
committed
fix false positive in metadata closed update
1 parent 05eb03d commit cf89f73

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

Diff for: src/WEDCore/WED_Version.h

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#define WED_VERSION_RES WED_VERSION_STRING
3535
#define WED_VERSION_BIN 2,3,1,1
3636

37+
3738
// This numeric is used by the gateway to understand if our WED is up-to-date.
3839
// Format 1 digit major + 2 digit middle + 1 digit minor version + last digit
3940
// last digit is 0 for all beta versions or matches release version

Diff for: src/WEDImportExport/WED_GatewayExport.cpp

+8-6
Original file line numberDiff line numberDiff line change
@@ -876,17 +876,19 @@ bool Enforce_MetaDataGuiLabel(WED_Airport * apt)
876876
string name;
877877
apt->GetName(name);
878878
bool isClosed = name.c_str()[0] == '[' && tolower(name.c_str()[1]) == 'x' && name.c_str()[2] == ']';
879+
bool changed_meta = false;
879880

880-
if(!apt->ContainsMetaDataKey(wed_AddMetaDataLGuiLabel) ||
881-
(isClosed && !apt->ContainsMetaDataKey(wed_AddMetaDataClosed)) ||
882-
(gExportTarget == wet_gateway && has3D != apt->GetMetaDataValue(wed_AddMetaDataLGuiLabel)))
881+
if (!apt->ContainsMetaDataKey(wed_AddMetaDataLGuiLabel))
883882
{
884883
apt->AddMetaDataKey(META_KeyName(wed_AddMetaDataLGuiLabel), has3D);
884+
changed_meta = true;
885+
}
886+
if(isClosed && !apt->ContainsMetaDataKey(wed_AddMetaDataClosed))
887+
{
885888
apt->AddMetaDataKey(META_KeyName(wed_AddMetaDataClosed), "1");
886-
return true;
889+
changed_meta = true;
887890
}
888-
else
889-
return false;
891+
return changed_meta;
890892
}
891893

892894
bool EnforceRecursive_MetaDataGuiLabel(WED_Thing * thing)

0 commit comments

Comments
 (0)