Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/core-frontend",
"comment": "Fix default KOQ -> QuantityType map value for CivilUnits.LENGTH",
"type": "none"
}
],
"packageName": "@itwin/core-frontend"
}
18 changes: 9 additions & 9 deletions core/frontend/src/quantity-formatting/QuantityFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ export class QuantityTypeFormatsProvider implements FormatsProvider {
["DefaultToolsUnits.VOLUME", QuantityType.Volume],
["DefaultToolsUnits.LENGTH_COORDINATE", QuantityType.Coordinate],
["CivilUnits.STATION", QuantityType.Stationing],
["CivilUnits.LENGTH", QuantityType.LengthSurvey],
["CivilUnits.LENGTH", QuantityType.LengthEngineering],
["AecUnits.LENGTH", QuantityType.LengthEngineering]
]);

Expand Down Expand Up @@ -692,7 +692,7 @@ export class QuantityFormatter implements UnitsProvider {
try {
// force all cached data to be reinitialized
await IModelApp.quantityFormatter.onInitialized();
} catch(err) {
} catch (err) {
Logger.logWarning(`${FrontendLoggerCategory.Package}.quantityFormatter`, BentleyError.getErrorMessage(err), BentleyError.getErrorMetadata(err));
Logger.logWarning(`${FrontendLoggerCategory.Package}.quantityFormatter`, "An exception occurred initializing the iModelApp.quantityFormatter with the given UnitsProvider. Defaulting back to the internal units provider.");
// If there is a problem initializing with the given provider, default back to the internal provider
Expand Down Expand Up @@ -1128,13 +1128,13 @@ export class QuantityFormatter implements UnitsProvider {
return this._formatSpecsRegistry.get(name);
}

/**
* Populates the registry with a new FormatterSpec and ParserSpec entry for the given format name.
* @beta
* @param name The key used to identify the formatter and parser spec
* @param persistenceUnitName The name of the persistence unit
* @param formatProps If not supplied, tries to retrieve the [[FormatProps]] from [[IModelApp.formatsProvider]]
*/
/**
* Populates the registry with a new FormatterSpec and ParserSpec entry for the given format name.
* @beta
* @param name The key used to identify the formatter and parser spec
* @param persistenceUnitName The name of the persistence unit
* @param formatProps If not supplied, tries to retrieve the [[FormatProps]] from [[IModelApp.formatsProvider]]
*/
public async addFormattingSpecsToRegistry(name: string, persistenceUnitName: string, formatProps?: FormatProps): Promise<void> {
if (!formatProps) {
formatProps = await IModelApp.formatsProvider.getFormat(name);
Expand Down
Loading