[TD]Fix section snapping (fix #15961) (#15450)

* [TD]Add view snapping preferences

* [TD]fix section snapping algo

- snap sections to section normal line.
- snap views to other views in X&Y

* [TD]fix snapping to ProjectionGroups
This commit is contained in:
WandererFan
2024-09-02 12:41:25 -04:00
committed by GitHub
parent 77539c1091
commit e852052df8
12 changed files with 404 additions and 119 deletions

View File

@@ -599,3 +599,16 @@ bool Preferences::alwaysShowLabel()
{
return getPreferenceGroup("General")->GetBool("AlwaysShowLabel", false);
}
bool Preferences::SnapViews()
{
return getPreferenceGroup("General")->GetBool("SnapViews", true);
}
//! percentage of view size to use in deciding to snap view or not
double Preferences::SnapLimitFactor()
{
return getPreferenceGroup("General")->GetFloat("SnapLimitFactor", 0.05);
}