fix: open source database for Ortho placement
This commit is contained in:
@@ -483,7 +483,9 @@ internal sealed class PlantViewportMembershipReader
|
||||
try
|
||||
{
|
||||
var openedByQuery = false;
|
||||
var sourceDatabase = sourceId.GetDatabase(false, ref openedByQuery);
|
||||
// The source model is normally not an active document in an Ortho /b session.
|
||||
// Ask MdObjectId to open its source database read-only and dispose it below when it did.
|
||||
var sourceDatabase = sourceId.GetDatabase(true, ref openedByQuery);
|
||||
try
|
||||
{
|
||||
stage = "StartTransaction";
|
||||
|
||||
@@ -37,4 +37,5 @@ public sealed class PxpOaRegistrationTests
|
||||
[Fact] public void ScriptDrivenPxpOa_UsesPreparedFixtureContextBeforeImplicitLookup() => Assert.Contains("TryGetPreparedContext(document, out var scriptContext)", Entry);
|
||||
[Fact] public void ScriptDrivenPrepare_SelectsCanonicalTargetAndRetainsReadOnlyContext() { Assert.Contains("preparedContext = context", Observer); Assert.Contains("selectedTargetSnapshotId = candidates[0]", Observer); }
|
||||
[Fact] public void PlacementReadFailure_IsDiagnosedInsteadOfBeingSilentlyDiscarded() { var source = File.ReadAllText(Path.Combine(ProjectRoot, "PlantReadPath.cs")); Assert.Contains("OrthoPipePlacementReadFailed", source); Assert.Contains("ORTHO_PIPE_PLACEMENT_UNAVAILABLE", source); }
|
||||
[Fact] public void PlacementReader_OpensSourceDatabaseWhenItIsNotActive() { var source = File.ReadAllText(Path.Combine(ProjectRoot, "PlantReadPath.cs")); Assert.Contains("sourceId.GetDatabase(true, ref openedByQuery)", source); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user