Skip to content
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

Disable undo/redo buttons when there is nothing to undo/redo #291

Merged
merged 2 commits into from
Aug 28, 2024

Conversation

SamTheBlow
Copy link
Contributor

Second take. (First take: #256)
I've rewritten it from scratch for the new Godot 4 version. I think my new approach looks much cleaner; let me know if anything needs to be changed.

I've tested it and it works as expected when switching between tabs, adding tabs, closing tabs, and loading projects. And this time the undo/redo buttons don't react when you zoom in/out, although, zooming still incorrectly dirties the project as mentioned in my previous PR.

Copy link
Owner

@mbrlabs mbrlabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, thank you!

Zooming dirties the project by design because the current camera position is part of the savefile

lorien/UI/Toolbar.gd Show resolved Hide resolved
@SamTheBlow
Copy link
Contributor Author

New commit!

The _on_active_project_changed method is meant to be an event. So, I added a signal "active_project_changed" so that it really is called like an event now. Thanks for pointing it out. Let me know if you like this more, otherwise we can just rename the method like you suggested

@SamTheBlow SamTheBlow requested a review from mbrlabs August 28, 2024 12:42
Copy link
Owner

@mbrlabs mbrlabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that works. Thank you!

@mbrlabs mbrlabs merged commit f53c840 into mbrlabs:main Aug 28, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants