-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
🐞 Menu Bar Items Not Updating #1684
Comments
Possible cause: |
Hm, just changing @State var windowController: CodeEditWindowController? to @StateObject var windowController: CodeEditWindowController? Throws an error, since we're applying StateObject to an optional type; is there an elegant workaround for this? |
@austincondiff can I be assigned to this issue? I think I should be able to fix #1696 as well, just a few minor tweaks needed |
### Description <!--- REQUIRED: Describe what changed in detail --> The issue is described in detail in #1684. ~I tried to resolve a related issue, #1696, but it was harder than I anticipated since the state of the Utility Area is stored separate to the other panes for some reason. Any ideas to resolve this slight issue would be welcome :)~ **EDIT:** I think I fixed it! ### Related Issues <!--- REQUIRED: Tag all related issues (e.g. * #123) --> <!--- If this PR resolves the issue please specify (e.g. * closes #123) --> <!--- If this PR addresses multiple issues, these issues must be related to one other --> * Closes #1684 * Closes #1696 ### Checklist <!--- Add things that are not yet implemented above --> - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md) - [x] The issues this PR addresses are related to each other - [x] My changes generate no new warnings - [x] My code builds and runs on my machine - [x] My changes are all related to the related issue above - [x] I documented my code ### Screenshots <!--- REQUIRED: if issue is UI related --> https://github.com/CodeEditApp/CodeEdit/assets/65467530/166d9b35-ede1-47b8-8814-cf1cbb1a61f2
Description
Menu bar items' text and disabled state do not update unless you exit and reenter window. Menu bar items that should toggle between "Show ___" and "Hide ___" simply stay in their original state until you exit and reenter the window. The same is true for disabled commands that are eligible to enable, but do not until you exit and reenter the window.
To Reproduce
The button will not have changed (from Hide Navigator to show Navigator or vice versa.)
The button will now have updated
Expected Behavior
When you click on a button - hide navigator for example - it will change states - changing to show navigator - without the need to exit and reenter the window.
Version Information
CodeEdit: [0.2]
macOS: [14.4.1]
Xcode: [15.3]
Additional Context
No response
Screenshots
8307d098-05a1-4c96-a3ad-5ff14e20f5f7.mp4
The text was updated successfully, but these errors were encountered: