Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.16.2 Hot Fix #14116

Merged
merged 3 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DYNAMO v.2.16.1 © 2022 Autodesk, Inc. All rights reserved.
DYNAMO v.2.16.2 © 2022 Autodesk, Inc. All rights reserved.
Dynamo License

Those portions created by Ian are provided with the following copyright:
Expand Down
1,200 changes: 599 additions & 601 deletions doc/distrib/License.rtf

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/AssemblySharedInfoGenerator/AssemblySharedInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
// to distinguish one build from another. AssemblyFileVersion is specified
// in AssemblyVersionInfo.cs so that it can be easily incremented by the
// automated build process.
[assembly: AssemblyVersion("2.16.1.2634")]
[assembly: AssemblyVersion("2.16.2.5437")]


// By default, the "Product version" shown in the file properties window is
Expand All @@ -64,4 +64,4 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("2.16.1.2634")]
[assembly: AssemblyFileVersion("2.16.2.5437")]
2 changes: 1 addition & 1 deletion src/AssemblySharedInfoGenerator/AssemblySharedInfo.tt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ using System.Runtime.InteropServices;
<#+
int MajorVersion = 2;
int MinorVersion = 16;
int BuildNumber = 1;
int BuildNumber = 2;
// The datetime baseline we choose using this algorithm will affect build number and all nuget packages uploaded
// Please only change when major or minor version got incremented
int RevisionNumber = ((int)(DateTime.UtcNow - new DateTime(2022,1,1)).TotalDays)*10+((int)DateTime.UtcNow.Hour)/3;
Expand Down
2 changes: 1 addition & 1 deletion src/Config/upiconfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<upi_attribute name='id' value='Win64'/>
<upi_element name='level'>
<upi_attribute name='name' value='build'/>
<upi_attribute name='id' value='2.16.1' />
<upi_attribute name='id' value='2.16.2' />
</upi_element>
</upi_element>
</upi_element>
Expand Down
17 changes: 13 additions & 4 deletions src/Libraries/CoreNodeModelsWpf/SliderViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;

using System;
using System.Globalization;
using CoreNodeModels.Input;

using Dynamo.Core;
Expand Down Expand Up @@ -63,7 +63,16 @@ public T Value
if (value.CompareTo(model.Min) == -1)
model.Min = value;

model.UpdateValue(new Dynamo.Graph.UpdateValueParams(nameof(Value), value.ToString()));
if(value is IFormattable formattableval)
{
var invariantString = formattableval.ToString(null,CultureInfo.InvariantCulture);
model.UpdateValue(new Dynamo.Graph.UpdateValueParams(nameof(Value), invariantString));
}
else
{
model.UpdateValue(new Dynamo.Graph.UpdateValueParams(nameof(Value), value.ToString()));
}

}
}

Expand Down Expand Up @@ -98,4 +107,4 @@ private void model_PropertyChanged(
}

}
}
}
43 changes: 42 additions & 1 deletion test/DynamoCoreWpfTests/SliderViewModelTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Windows.Controls;
using CoreNodeModels;
using CoreNodeModels.Input;
Expand Down Expand Up @@ -132,5 +134,44 @@ public void SliderViewModel_ValueTest()
Assert.AreEqual("-200", minTextBox.Text);
Assert.AreEqual("200", maxTextBox.Text);
}

/// <summary>
/// This test will validate that setting the string in a , dec seperator culture does not
/// modify the value.
/// </summary>
[Test]
public void SliderViewModel_ValueTest_Localized()
{
//change current thread culture to German.
var deCulture = CultureInfo.CreateSpecificCulture("de-DE");

var currentCulture = Thread.CurrentThread.CurrentCulture;
var currentUICulture = Thread.CurrentThread.CurrentUICulture;

Thread.CurrentThread.CurrentCulture = deCulture;
Thread.CurrentThread.CurrentUICulture = deCulture;

//create a slider
var slider = new CoreNodeModels.Input.DoubleSlider();
Model.CurrentWorkspace.AddAndRegisterNode(slider);

DispatcherUtil.DoEvents();

//get viewmodel.
var nodeViews = View.NodeViewsInFirstWorkspace();
var nodeView = nodeViews.OfNodeModelType<CoreNodeModels.Input.DoubleSlider>().FirstOrDefault();
var dynamoSliderControl = nodeView.grid.ChildrenOfType<DynamoSlider>().FirstOrDefault();
//Setting the Value property from the SliderViewModel
var sliderViewModel = dynamoSliderControl.DataContext as SliderViewModel<double>;
sliderViewModel.Value = 10.7;

DispatcherUtil.DoEvents();

Assert.AreEqual(10.7,slider.Value);
//reset culture
Thread.CurrentThread.CurrentCulture = currentCulture;
Thread.CurrentThread.CurrentUICulture = currentUICulture;

}
}
}
6 changes: 3 additions & 3 deletions tools/autobuild/build.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"product_id": "DYN",
"release_id": "2.16.0",
"master_id": "Win64",
"build_id": "2.16.1",
"name": "2.16.1",
"build_milestone": "Update 1",
"build_id": "2.16.2",
"name": "2.16.2",
"build_milestone": "Update 2",
"description":"Build"
}