@@ -189,6 +189,7 @@ public partial class WorldForm : Form, DXForm
189189 WorldSnapMode SnapModePrev = WorldSnapMode . Ground ; //also the default snap mode
190190 float SnapGridSize = 1.0f ;
191191
192+ public bool SnapMultiSelectEach = false ;
192193
193194 public bool EditEntityPivot { get ; set ; } = false ;
194195
@@ -1757,12 +1758,31 @@ private void Widget_OnPositionChange(Vector3 newpos, Vector3 oldpos)
17571758 {
17581759 //called during UpdateWidgets()
17591760
1760- newpos = SnapPosition ( newpos ) ;
1761+
17611762
1762- if ( newpos == oldpos ) return ;
1763+ if ( SnapMultiSelectEach && SelectedItem . MultipleSelectionItems != null )
1764+ {
1765+ for ( int i = 0 ; i < SelectedItem . MultipleSelectionItems . Length ; i ++ )
1766+ {
1767+ MapSelection item = SelectedItem . MultipleSelectionItems [ i ] ;
1768+ Vector3 posToGround = item . WidgetPosition ;
1769+ posToGround . Z = newpos . Z ;
1770+
1771+ Vector3 tempNewPos = SnapPosition ( posToGround ) ;
17631772
1764- SelectedItem . SetPosition ( newpos , EditEntityPivot ) ;
1773+ if ( tempNewPos == item . WidgetPosition ) return ;
17651774
1775+ item . SetPosition ( tempNewPos , EditEntityPivot ) ;
1776+ }
1777+ }
1778+ else
1779+ {
1780+ newpos = SnapPosition ( newpos ) ;
1781+
1782+ if ( newpos == oldpos ) return ;
1783+
1784+ SelectedItem . SetPosition ( newpos , EditEntityPivot ) ;
1785+ }
17661786 SelectedItem . UpdateGraphics ( this ) ;
17671787
17681788 if ( ProjectForm != null )
@@ -8014,6 +8034,12 @@ private void SubtitleTimer_Tick(object sender, EventArgs e)
80148034 SubtitleTimer . Enabled = false ;
80158035 SubtitleLabel . Visible = false ;
80168036 }
8037+
8038+ private void RelativeSnapForEachItemToolStripMenuItem_Click ( object sender , EventArgs e )
8039+ {
8040+ RelativeGroundForEachItemToolStripMenuItem . Checked = ! RelativeGroundForEachItemToolStripMenuItem . Checked ;
8041+ SnapMultiSelectEach = RelativeGroundForEachItemToolStripMenuItem . Checked ;
8042+ }
80178043 }
80188044
80198045 public enum WorldControlMode
0 commit comments