Made the Draw event clearer.
Made a DrawBefore and DrawAfter Handler and made the params clearer. Made switching to simple mode work. Made simple mode get the right initial state from oem settings.
This commit is contained in:
parent
8132713296
commit
1e4cb18312
7 changed files with 112 additions and 20 deletions
|
|
@ -62,7 +62,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
HAnchor = HAnchor.FitToChildren;
|
||||
|
||||
MeshViewerToDrawWith.TrackballTumbleWidget.DrawGlContent += TrackballTumbleWidget_DrawGlContent;
|
||||
MeshViewerToDrawWith.Draw += MeshViewerToDrawWith_Draw;
|
||||
MeshViewerToDrawWith.DrawAfter += new DrawEventHandler(MeshViewerToDrawWith_Draw);
|
||||
}
|
||||
|
||||
MeshViewerWidget MeshViewerToDrawWith { get { return view3DWidget.meshViewerWidget; } }
|
||||
|
|
@ -114,11 +114,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
Vector2 startLineGroundPos;
|
||||
Vector2 startLineSelectionPos;
|
||||
|
||||
void MeshViewerToDrawWith_Draw(object sender, EventArgs e)
|
||||
void MeshViewerToDrawWith_Draw(GuiWidget drawingWidget, DrawEventArgs drawEvent)
|
||||
{
|
||||
if (Visible)
|
||||
{
|
||||
DrawEventArgs drawEvent = e as DrawEventArgs;
|
||||
if (drawEvent != null)
|
||||
{
|
||||
double yGround = (int)(startLineGroundPos.y + .5) + .5;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue