Skip to content

disallows the user from choosing the add menu option on an uncompiled file #420

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

Merged
merged 6 commits into from
Jul 18, 2024
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
- Fixed JS errors in Studio on certain operations (#416)
- Add menu option disabled for unsaved files (#420)
- Fixed issue where selecting different item in stash list didn't update diff view (#265)
- Tooltip in workspace now shows user who made uncommitted change if not current user (#411)
- Files are added to source control upon creation properly (#404)
Expand Down
7 changes: 6 additions & 1 deletion cls/SourceControl/Git/Extension.cls
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,12 @@ Method OnSourceMenuContextItem(itemName As %String, menuItemName As %String, ByR
} elseif ##class(SourceControl.Git.Utils).IsInSourceControl(itemName) {
set Enabled = $case(menuItemName, "AddToSC":-1,:1)
} else {
set Enabled = $case(menuItemName, "AddToSC":1,:-1)
if (##class(SourceControl.Git.Utils).Type(itemName) = "cls") && ('$$$defClassDefined($extract(itemName, 1, $length(itemName) - 4))) {
set Enabled = -1
} else {
set Enabled = $case(menuItemName, "AddToSC":1,:-1)
}

}
if (menuItemName '= "") {
set DisplayName = ..LocalizeName(menuItemName)
Expand Down
Loading