Skip to content

Commit aad69a6

Browse files
authored
Merge pull request #202 from Nfactor26/minor-bug-fixes
Minor bug fixes
2 parents a7f84c8 + bebc019 commit aad69a6

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

src/Pixel.Automation.AppExplorer.ViewModels/Application/ApplicationExplorerViewModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ await this.eventAggregator.PublishOnUIThreadAsync(new PropertyGridObjectEventArg
227227
try
228228
{
229229
await SaveApplicationAsync(applicationDescriptionViewModel);
230+
await notificationManager.ShowSuccessNotificationAsync("Application was saved");
230231
}
231232
catch (Exception ex)
232233
{

src/Pixel.Automation.AppExplorer.ViewModels/Control/ControlExplorerViewModel.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,11 @@ await this.eventAggregator.PublishOnUIThreadAsync(new PropertyGridObjectEventArg
343343
try
344344
{
345345
await SaveControlDetails(controlToEdit, false);
346+
await notificationManager.ShowSuccessNotificationAsync("Control was saved");
346347
}
347348
catch(Exception ex)
348349
{
349-
logger.Error(ex, "There was an error while trying to edit control : {0}", controlToEdit.ControlName);
350+
logger.Error(ex, "There was an error while trying to save control : {0}", controlToEdit.ControlName);
350351
await notificationManager.ShowErrorNotificationAsync(ex);
351352
}
352353
},

src/Pixel.Automation.Designer.ViewModels/PropertyGrid/PropertyGridViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public bool IsReadOnly
2121

2222
public bool ShowSaveButton => this.onSave != null;
2323

24-
private Action onSave;
24+
private Func<Task> onSave;
2525

2626
private Func<bool> canSave;
2727

@@ -37,7 +37,7 @@ public void SetState(object selectedObject, bool isReadOnly, Func<Task> saveComm
3737
{
3838
this.selectedObject = selectedObject;
3939
this.isReadOnly = isReadOnly;
40-
this.onSave = () => saveCommand();
40+
this.onSave = saveCommand;
4141
this.canSave = canSave;
4242
NotifyOfPropertyChange(() => SelectedObject);
4343
NotifyOfPropertyChange(() => IsReadOnly);

src/Pixel.Automation.UIA.Components/WinControlIdentity.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public class WinControlIdentity : ControlIdentity
6060

6161
[DataMember(Order = 310)]
6262
[Category("Supported Patterns")]
63-
public List<string> SupportedPatterns { get; set; }
63+
public List<string> SupportedPatterns { get; set; } = new();
6464

6565

6666
#region required during scraping
@@ -84,7 +84,7 @@ public int ProcessId
8484

8585
public WinControlIdentity() : base()
8686
{
87-
this.SupportedPatterns = new List<string>();
87+
8888
}
8989

9090

@@ -114,6 +114,7 @@ public override object Clone()
114114
Next = this.Next?.Clone() as WinControlIdentity
115115

116116
};
117+
clone.SupportedPatterns.AddRange(this.SupportedPatterns);
117118
return clone;
118119
}
119120

0 commit comments

Comments
 (0)