-
Notifications
You must be signed in to change notification settings - Fork 635
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
fix watchTree silent crash #12975
fix watchTree silent crash #12975
Changes from all commits
6ea8815
d8d3402
f49b66a
56729bb
d9570b5
5d485d1
e7cff2a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,15 +39,15 @@ public void CustomizeView(Watch nodeModel, NodeView nodeView) | |
this.watch = nodeModel; | ||
this.syncContext = new DispatcherSynchronizationContext(nodeView.Dispatcher); | ||
|
||
var watchTree = new WatchTree(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is any of this code new to 2.15 that causes this to fail only in 2.15? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hard to tell by looking at the code...multiple things can contribute to this bug The loaded event can be triggered multiple times with/without data context. Looks like at least in 2.15...a Loaded event is triggered without data context (when opening the .dyn attached to the jira task) |
||
// make empty watchViewModel | ||
rootWatchViewModel = new WatchViewModel(dynamoViewModel.BackgroundPreviewViewModel.AddLabelForPath); | ||
|
||
var watchTree = new WatchTree(rootWatchViewModel); | ||
watchTree.BorderThickness = new Thickness(1, 1, 1, 1); | ||
watchTree.BorderBrush = new SolidColorBrush(Color.FromRgb(220,220,220)); | ||
|
||
watchTree.SetWatchNodeProperties(); | ||
|
||
// make empty watchViewModel | ||
rootWatchViewModel = new WatchViewModel(dynamoViewModel.BackgroundPreviewViewModel.AddLabelForPath); | ||
|
||
nodeView.PresentationGrid.Children.Add(watchTree); | ||
nodeView.PresentationGrid.Visibility = Visibility.Visible; | ||
// disable preview control | ||
|
@@ -61,9 +61,6 @@ public void CustomizeView(Watch nodeModel, NodeView nodeView) | |
|
||
private void Bind(WatchTree watchTree, NodeView nodeView) | ||
{ | ||
// The WatchTree Control is bound to the WatchViewModel | ||
watchTree.DataContext = rootWatchViewModel; | ||
|
||
// Add binding for TreeView | ||
var sourceBinding = new Binding("Children") | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be ok to break right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes