Improving fit to bounds default position on rebuild
Making it easier to see that you have opened the obsolete version of a file
This commit is contained in:
parent
51da7c21b0
commit
1ef0a37f1d
10 changed files with 45 additions and 19 deletions
|
|
@ -27,8 +27,12 @@ of the authors and should not be interpreted as representing official policies,
|
|||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
|
||||
/*********************************************************************/
|
||||
/**************************** OBSOLETE! ******************************/
|
||||
/************************ USE NEWER VERSION **************************/
|
||||
/*********************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -36,8 +40,6 @@ using MatterHackers.Agg;
|
|||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.DataConverters3D;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.DesignTools;
|
||||
using MatterHackers.PolygonMesh;
|
||||
|
||||
namespace MatterHackers.MatterControl.PartPreviewWindow.View3D
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,6 +27,12 @@ of the authors and should not be interpreted as representing official policies,
|
|||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
|
||||
|
||||
/*********************************************************************/
|
||||
/**************************** OBSOLETE! ******************************/
|
||||
/************************ USE NEWER VERSION **************************/
|
||||
/*********************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
|
|
|||
|
|
@ -27,6 +27,11 @@ of the authors and should not be interpreted as representing official policies,
|
|||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
|
||||
/*********************************************************************/
|
||||
/**************************** OBSOLETE! ******************************/
|
||||
/************************ USE NEWER VERSION **************************/
|
||||
/*********************************************************************/
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
|
|
|
|||
|
|
@ -27,8 +27,12 @@ of the authors and should not be interpreted as representing official policies,
|
|||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
|
||||
/*********************************************************************/
|
||||
/**************************** OBSOLETE! ******************************/
|
||||
/************************ USE NEWER VERSION **************************/
|
||||
/*********************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -36,8 +40,6 @@ using MatterHackers.Agg;
|
|||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.DataConverters3D;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.DesignTools;
|
||||
using MatterHackers.PolygonMesh;
|
||||
|
||||
namespace MatterHackers.MatterControl.PartPreviewWindow.View3D
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,19 +27,18 @@ of the authors and should not be interpreted as representing official policies,
|
|||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
/*********************************************************************/
|
||||
/**************************** OBSOLETE! ******************************/
|
||||
/************************ USE NEWER VERSION **************************/
|
||||
/*********************************************************************/
|
||||
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.DataConverters3D;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.DesignTools.Operations;
|
||||
using MatterHackers.MatterControl.PartPreviewWindow.View3D;
|
||||
using MatterHackers.PolygonMesh;
|
||||
using MatterHackers.VectorMath;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace MatterHackers.MatterControl.DesignTools
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,6 +27,11 @@ of the authors and should not be interpreted as representing official policies,
|
|||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
|
||||
/*********************************************************************/
|
||||
/**************************** OBSOLETE! ******************************/
|
||||
/************************ USE NEWER VERSION **************************/
|
||||
/*********************************************************************/
|
||||
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.DataConverters3D;
|
||||
using MatterHackers.Localizations;
|
||||
|
|
|
|||
|
|
@ -27,11 +27,14 @@ of the authors and should not be interpreted as representing official policies,
|
|||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
|
||||
using MatterHackers.Agg.UI;
|
||||
/*********************************************************************/
|
||||
/**************************** OBSOLETE! ******************************/
|
||||
/************************ USE NEWER VERSION **************************/
|
||||
/*********************************************************************/
|
||||
|
||||
using MatterHackers.DataConverters3D;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.VectorMath;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Threading.Tasks;
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
return base.GetAxisAlignedBoundingBox(matrix);
|
||||
}
|
||||
|
||||
public override void OnInvalidate(InvalidateArgs invalidateType)
|
||||
public override async void OnInvalidate(InvalidateArgs invalidateType)
|
||||
{
|
||||
if ((invalidateType.InvalidateType == InvalidateType.Content
|
||||
|| invalidateType.InvalidateType == InvalidateType.Matrix
|
||||
|
|
@ -143,12 +143,12 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
&& invalidateType.Source != this
|
||||
&& !RebuildLocked)
|
||||
{
|
||||
Rebuild();
|
||||
await Rebuild();
|
||||
}
|
||||
else if (invalidateType.InvalidateType == InvalidateType.Properties
|
||||
&& invalidateType.Source == this)
|
||||
{
|
||||
Rebuild();
|
||||
await Rebuild();
|
||||
}
|
||||
else if ((invalidateType.InvalidateType == InvalidateType.Properties
|
||||
|| invalidateType.InvalidateType == InvalidateType.Matrix
|
||||
|
|
@ -175,6 +175,10 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
cacheRequestedMatrix = new Matrix4X4();
|
||||
var after = this.GetAxisAlignedBoundingBox();
|
||||
|
||||
var newAabbb = this.GetAxisAlignedBoundingBox();
|
||||
|
||||
this.Translate(aabb.Center - newAabbb.Center);
|
||||
|
||||
if (aabb.ZSize > 0)
|
||||
{
|
||||
// If the part was already created and at a height, maintain the height.
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 45f10600c6b9ae4de450e782e9ef66b82d5179bb
|
||||
Subproject commit 283f0ae00cf347fd9345de2fe100846e2dd7d95e
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 445c807b0a95253b31273fc8194054283227997a
|
||||
Subproject commit a1e536bd0d14cd92af62cf3bdc90f9a53d4c1cff
|
||||
Loading…
Add table
Add a link
Reference in a new issue