File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Src/Common/Controls/DetailControls Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -1399,12 +1399,16 @@ public bool DoNotRefresh
13991399 /// True to not recycle any slices.
14001400 /// False to try and recycle them.
14011401 /// </param>
1402+ /// <param name="restoreFocusSlice"> True to restore the focus slices.</param>
14021403 /// <remarks>
14031404 /// If the DataTree's slices call this method, they should use 'false',
14041405 /// or they will be disposed when this call returns to them.
1406+ /// Update 12/2025: Passing 'false' for 'differentObject' still appears to dispose
1407+ /// all the existing slices and create new ones. It does this when called from
1408+ /// Slice.MoveField() and possibly from other or all situations.
14051409 /// </remarks>
14061410 /// ------------------------------------------------------------------------------------
1407- public virtual void RefreshList ( bool differentObject )
1411+ public void RefreshList ( bool differentObject , bool restoreFocusSlice = false )
14081412 {
14091413 CheckDisposed ( ) ;
14101414 if ( m_fDoNotRefresh )
@@ -1497,7 +1501,10 @@ public virtual void RefreshList(bool differentObject)
14971501 // Scrolling the control into view needs to be done after we resume the layout.
14981502 if ( m_currentSlice != null )
14991503 {
1500- m_currentSlice . TakeFocus ( false ) ;
1504+ if ( restoreFocusSlice )
1505+ {
1506+ m_currentSlice . TakeFocus ( false ) ;
1507+ }
15011508 ScrollControlIntoView ( m_currentSlice ) ;
15021509 }
15031510
Original file line number Diff line number Diff line change @@ -2853,7 +2853,7 @@ private void MoveField(Direction dir)
28532853 // Persist in the parent part (might not be the immediate parent node)
28542854 Inventory . GetInventory ( "layouts" , m_cache . ProjectId . Name )
28552855 . PersistOverrideElement ( PartParent ( fieldRef ) ) ;
2856- ContainingDataTree . RefreshList ( true ) ;
2856+ ContainingDataTree . RefreshList ( true , true ) ;
28572857 }
28582858
28592859 /// <summary>
You can’t perform that action at this time.
0 commit comments