From d09eb3ec490d9b3880d98458fe96b5af334c3525 Mon Sep 17 00:00:00 2001 From: kike-garbo Date: Fri, 3 May 2024 16:27:06 +0200 Subject: [PATCH] Fix on 'Revit Issue' component. --- .../Components/Sheets/AddRevision.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/RhinoInside.Revit.GH/Components/Sheets/AddRevision.cs b/src/RhinoInside.Revit.GH/Components/Sheets/AddRevision.cs index a6f4142d3..85102e1cf 100644 --- a/src/RhinoInside.Revit.GH/Components/Sheets/AddRevision.cs +++ b/src/RhinoInside.Revit.GH/Components/Sheets/AddRevision.cs @@ -234,7 +234,7 @@ protected override void TrySolveInstance(IGH_DataAccess DA) update |= Params.GetData(DA, "Issued To", out string issuedTo); update |= Params.GetData(DA, "Issued", out bool? issued); - if (update) Invoke(this, revision.Value, date, description, issuedBy, issuedTo, issued); + if (update && !Invoke(this, revision.Value, date, description, issuedBy, issuedTo, issued)) return; Params.TrySetData(DA, "Revision", () => revision); @@ -246,7 +246,7 @@ protected override void TrySolveInstance(IGH_DataAccess DA) Params.TrySetData(DA, "Issued", () => revision.Issued); } - internal static void Invoke(TransactionalChainComponent component, ARDB.Revision revision, string date, string description, string issuedBy, string issuedTo, bool? issued) + internal static bool Invoke(TransactionalChainComponent component, ARDB.Revision revision, string date, string description, string issuedBy, string issuedTo, bool? issued) { var updateDate = date is object && revision.RevisionDate != date; var updateDescription = description is object && revision.Description != description; @@ -270,7 +270,7 @@ internal static void Invoke(TransactionalChainComponent component, ARDB.Revision if (updateDescription) component.AddContinuableFailure($"Can't set 'Revision Description' parameter. Revision '{revision.Description}' is already issued. {{{revision.Id}}}"); if (updateIssuedBy) component.AddContinuableFailure($"Can't set 'Issued By' parameter. Revision '{revision.Description}' is already issued. {{{revision.Id}}}"); if (updateIssuedTo) component.AddContinuableFailure($"Can't set 'Issued To' parameter. Revision '{revision.Description}' is already issued. {{{revision.Id}}}"); - return; + return false; case ARDB.FailureProcessingResult.ProceedWithCommit: revision.Issued = false; @@ -297,7 +297,8 @@ internal static void Invoke(TransactionalChainComponent component, ARDB.Revision if (updateIssuedTo) revision.IssuedTo = issuedTo; if (updateIssued) revision.Issued = issued.Value; } + + return true; } } - }