Skip to content

Commit 8c7d355

Browse files
committed
cancel edit cell if exit unity, fixes #176
1 parent 6e64cc2 commit 8c7d355

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

UnityLauncherPro/MainWindow.xaml.cs

+7
Original file line numberDiff line numberDiff line change
@@ -2931,6 +2931,13 @@ public void ProcessExitedCallBack(Project proj)
29312931
//Console.WriteLine("Process Exited: " + proj.Path);
29322932
//var index = projectsSource.IndexOf(proj); // this fails since proj has changed after refresh (timestamp or other data)
29332933

2934+
// if currently editing field, cancel it (otherwise crash)
2935+
IEditableCollectionView itemsView = gridRecent.Items;
2936+
if (itemsView.IsAddingNew || itemsView.IsEditingItem)
2937+
{
2938+
gridRecent.CancelEdit(DataGridEditingUnit.Cell);
2939+
}
2940+
29342941
// FIXME nobody likes extra loops.. but only 40 items to find correct project? but still..
29352942
for (int i = 0, len = projectsSource.Count; i < len; i++)
29362943
{

0 commit comments

Comments
 (0)