Skip to content

Commit

Permalink
Merge pull request #1317 from Azaezel/alpha41/ohSnap
Browse files Browse the repository at this point in the history
preserve gridsnap state between runs
  • Loading branch information
Azaezel authored Sep 17, 2024
2 parents e7585f1 + 0612d85 commit e9638d2
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2488,7 +2488,8 @@ function EWorldEditor::syncGui( %this )
ESnapOptions-->SnapSize.setText( EWorldEditor.getSoftSnapSize() );
ESnapOptions-->GridSize.setText( EWorldEditor.getGridSize() );

ESnapOptions-->GridSnapButton.setStateOn( %this.getGridSnap() );
%this.UseGridSnap = EditorSettings.value("WorldEditor/Tools/UseGridSnap");
ESnapOptions-->GridSnapButton.setStateOn( %this.UseGridSnap );

%this.UseGroupCenter = EditorSettings.value("WorldEditor/Tools/UseGroupCenter");

Expand Down Expand Up @@ -2762,7 +2763,9 @@ function toggleSnappingOptions( %var )
}
else if( %var $= "grid" )
{
EWorldEditor.setGridSnap( !EWorldEditor.getGridSnap() );
EWorldEditor.UseGridSnap = !EWorldEditor.UseGridSnap;
EditorSettings.setValue("WorldEditor/Tools/UseGridSnap", EWorldEditor.UseGridSnap );
EWorldEditor.setGridSnap( EWorldEditor.UseGridSnap );
}
else if( %var $= "byGroup" )
{
Expand Down

0 comments on commit e9638d2

Please sign in to comment.