@@ -83,6 +83,7 @@ public class ModellingConnectionHandler : ModellingHandlerBase
8383 public ModellingAppRole DummyAppRole = new ( ) ;
8484 public int LastWidth = GlobalConst . kGlobLibraryWidth ;
8585 public bool LastCollapsed = false ;
86+ public bool ActConnNeedsRefresh = true ;
8687
8788 private bool SrcFix = false ;
8889 private bool DstFix = false ;
@@ -156,7 +157,12 @@ public async Task ReInit()
156157 {
157158 try
158159 {
159- await RefreshActConn ( ) ;
160+ // exclude the cases where ActConn has to be held (e.g. if there is an ui binding)
161+ if ( ActConnNeedsRefresh )
162+ {
163+ await RefreshActConn ( ) ;
164+ }
165+
160166 await RefreshObjects ( ) ;
161167 await RefreshParent ( ) ;
162168 }
@@ -1085,18 +1091,6 @@ public async Task<bool> Save(bool noCheck = false)
10851091 }
10861092 if ( noCheck || CheckConn ( ) )
10871093 {
1088- if ( ! SrcReadOnly )
1089- {
1090- SyncSrcChanges ( ) ;
1091- }
1092- if ( ! DstReadOnly )
1093- {
1094- SyncDstChanges ( ) ;
1095- }
1096- if ( ! SvcReadOnly )
1097- {
1098- SyncSvcChanges ( ) ;
1099- }
11001094 ActConn . SyncState ( DummyAppRole . Id ) ;
11011095 if ( AddMode )
11021096 {
@@ -1292,24 +1286,23 @@ await LogChange(ModellingTypes.ChangeType.Insert, ModellingTypes.ModObjectType.C
12921286 $ "New { ( ActConn . IsInterface ? "Interface" : "Connection" ) } : { ActConn . Name } ", AppId ) ;
12931287 if ( ActConn . UsedInterfaceId == null || ActConn . DstFromInterface )
12941288 {
1295- await AddNwObjects ( ModellingAppServerWrapper . Resolve ( ActConn . SourceAppServers ) . ToList ( ) ,
1296- ModellingAppRoleWrapper . Resolve ( ActConn . SourceAppRoles ) . ToList ( ) ,
1297- ModellingNetworkAreaWrapper . Resolve ( ActConn . SourceAreas ) . ToList ( ) ,
1298- ModellingNwGroupWrapper . Resolve ( ActConn . SourceOtherGroups ) . ToList ( ) ,
1299- ModellingTypes . ConnectionField . Source ) ;
1289+ await AddNwObjects ( SrcAppServerToAdd ,
1290+ SrcAppRolesToAdd ,
1291+ SrcAreasToAdd ,
1292+ SrcNwGroupsToAdd ,
1293+ ModellingTypes . ConnectionField . Source ) ;
13001294 }
13011295 if ( ActConn . UsedInterfaceId == null || ActConn . SrcFromInterface )
13021296 {
1303- await AddNwObjects ( ModellingAppServerWrapper . Resolve ( ActConn . DestinationAppServers ) . ToList ( ) ,
1304- ModellingAppRoleWrapper . Resolve ( ActConn . DestinationAppRoles ) . ToList ( ) ,
1305- ModellingNetworkAreaWrapper . Resolve ( ActConn . DestinationAreas ) . ToList ( ) ,
1306- ModellingNwGroupWrapper . Resolve ( ActConn . DestinationOtherGroups ) . ToList ( ) ,
1307- ModellingTypes . ConnectionField . Destination ) ;
1297+ await AddNwObjects ( DstAppServerToAdd ,
1298+ DstAppRolesToAdd ,
1299+ DstAreasToAdd ,
1300+ DstNwGroupsToAdd ,
1301+ ModellingTypes . ConnectionField . Destination ) ;
13081302 }
13091303 if ( ActConn . UsedInterfaceId == null )
13101304 {
1311- await AddSvcObjects ( ModellingServiceWrapper . Resolve ( ActConn . Services ) . ToList ( ) ,
1312- ModellingServiceGroupWrapper . Resolve ( ActConn . ServiceGroups ) . ToList ( ) ) ;
1305+ await AddSvcObjects ( SvcToAdd , SvcGrpToAdd ) ;
13131306 }
13141307 ActConn . Creator = userConfig . User . Name ;
13151308 ActConn . CreationDate = DateTime . Now ;
0 commit comments