Skip to content

Commit

Permalink
fix: setting project name in cura 5.6.0 does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
MaSch0212 committed Apr 13, 2024
1 parent b90159c commit 8ceb83f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docs/release-notes/next.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ The following changes were made in this version:

| Type | Description |
| ---- | ----------- |
| fix | With newer version of Cura, setting the project name sometimes does not work. |
| feature | CuraManager now officially supports Cura version 5.6.0 and 5.7.0. |
| tech | Updated to .NET 8.0. |
| tech | Updated dependencies. |

**Important:** Before updating make sure to install the latest Version of the .NET 8.0 Desktop Runtime from [here](https://dotnet.microsoft.com/en-us/download/dotnet/8.0).

[comment]: # (Use one of the following types: feature, bugfix, tech)
[comment]: # (Use one of the following types: feature, bugfix, tech)
7 changes: 5 additions & 2 deletions src/CuraManager/Services/CuraService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class CuraService : ICuraService

private readonly ISettingsService _settingsService;

public Version LatestSupportedCuraVersion { get; } = new Version(5, 5, 0, 0);
public Version LatestSupportedCuraVersion { get; } = new Version(5, 7, 0, 0);

internal CuraService()
: this(ServiceContext.GetService<ISettingsService>()) { }
Expand Down Expand Up @@ -158,7 +158,10 @@ bool CheckWindow(TreeWalker treeWalker, AutomationElement e)
bool CheckEditNameButton(TreeWalker treeWalker, AutomationElement e)
{
return ReferenceEquals(e.Current.ControlType, ControlType.Edit)
&& !e.Current.IsOffscreen;
&& !e.Current.IsOffscreen
&& e.TryGetCurrentPattern(ValuePattern.Pattern, out var objValuePattern)
&& objValuePattern is ValuePattern valuePattern
&& !valuePattern.Current.IsReadOnly;
}
}
}
Expand Down

0 comments on commit 8ceb83f

Please sign in to comment.