Make sure we update the view as we subtract
Respect OEM store setting Fixed link on + tab
This commit is contained in:
parent
687f317400
commit
e84faeb3d6
6 changed files with 11 additions and 34 deletions
|
|
@ -83,9 +83,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.PlusTab
|
|||
{
|
||||
MatterControlApplication.Instance.LaunchBrowser("http://www.matterhackers.com/" + item.url);
|
||||
}
|
||||
else if (item.reference != null)
|
||||
else if (item.link != null)
|
||||
{
|
||||
MatterControlApplication.Instance.LaunchBrowser(item.reference);
|
||||
MatterControlApplication.Instance.LaunchBrowser(item.link);
|
||||
}
|
||||
|
||||
base.OnClick(mouseEvent);
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.PlusTab
|
|||
public string description;
|
||||
public string hero;
|
||||
public string icon;
|
||||
public string reference;
|
||||
public string link;
|
||||
public string title;
|
||||
public string url;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.PlusTab
|
|||
};
|
||||
this.AddChild(leftContent);
|
||||
|
||||
this.AddChild(new ExplorePanel(theme));
|
||||
if (OemSettings.Instance.ShowShopButton)
|
||||
{
|
||||
this.AddChild(new ExplorePanel(theme));
|
||||
}
|
||||
|
||||
this.HAnchor = HAnchor.Stretch;
|
||||
this.VAnchor = VAnchor.Stretch;
|
||||
|
|
@ -169,35 +172,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.PlusTab
|
|||
});
|
||||
};
|
||||
otherItemsSection.AddChild(redeemShareCode);
|
||||
|
||||
if (OemSettings.Instance.ShowShopButton)
|
||||
{
|
||||
var shopButton = theme.ButtonFactory.Generate("Buy Materials".Localize(), AggContext.StaticData.LoadIcon("icon_shopping_cart_32x32.png", 24, 24, IconColor.Theme));
|
||||
shopButton.ToolTipText = "Shop online for printing materials".Localize();
|
||||
shopButton.Name = "Buy Materials Button";
|
||||
shopButton.HAnchor = HAnchor.Left;
|
||||
shopButton.Margin = buttonSpacing;
|
||||
shopButton.Click += (sender, e) =>
|
||||
{
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
simpleTabs.RemoveTab(simpleTabs.ActiveTab);
|
||||
|
||||
double activeFilamentDiameter = 0;
|
||||
if (ActiveSliceSettings.Instance.PrinterSelected)
|
||||
{
|
||||
activeFilamentDiameter = 3;
|
||||
if (ActiveSliceSettings.Instance.GetValue<double>(SettingsKey.filament_diameter) < 2)
|
||||
{
|
||||
activeFilamentDiameter = 1.75;
|
||||
}
|
||||
}
|
||||
|
||||
MatterControlApplication.Instance.LaunchBrowser("http://www.matterhackers.com/mc/store/redirect?d={0}&clk=mcs&a={1}".FormatWith(activeFilamentDiameter, OemSettings.Instance.AffiliateCode));
|
||||
});
|
||||
};
|
||||
otherItemsSection.AddChild(shopButton);
|
||||
}
|
||||
}
|
||||
|
||||
private FlowLayoutWidget CreateSection(GuiWidget parent, string headingText)
|
||||
|
|
|
|||
|
|
@ -209,6 +209,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.View3D
|
|||
{
|
||||
paint.Mesh = PolygonMesh.Csg.CsgOperations.Union(paint.Mesh, intersectAndSubtract.intersect);
|
||||
}
|
||||
|
||||
view3DWidget.Invalidate();
|
||||
}
|
||||
|
||||
// move the paint mesh back to its original coordinates
|
||||
|
|
|
|||
|
|
@ -174,6 +174,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.View3D
|
|||
inverse.Invert();
|
||||
transformedKeep.Transform(inverse);
|
||||
keep.Mesh = transformedKeep;
|
||||
view3DWidget.Invalidate();
|
||||
}
|
||||
|
||||
remove.Visible = false;
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit fe3ea44b1e3d07e62a1eb57ce6c3351e7c3308f2
|
||||
Subproject commit 883160d3d769e23ba0f99466526adc2a0342eeb0
|
||||
Loading…
Add table
Add a link
Reference in a new issue