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

Enable/Disable the undo and redo toolbar/menu buttons correctly #11758

Merged
merged 2 commits into from
Sep 13, 2024

Conversation

HoussemNasri
Copy link
Member

@HoussemNasri HoussemNasri commented Sep 13, 2024

Closes #8807

Screenshots

  • Redo button is disabled
    image

  • Undo button is disabled
    image

Mandatory checks

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

Copy link
Member

@Siedlerchr Siedlerchr left a comment

Choose a reason for hiding this comment

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

from my side looks good but better have olly and carl take a look s well

@Siedlerchr Siedlerchr added this pull request to the merge queue Sep 13, 2024
Merged via the queue into JabRef:main with commit 9634a13 Sep 13, 2024
23 checks passed
// TODO: Rework the UndoManager to something like the following, if it had a property.
// this.executable.bind(frame.getCurrentBasePanel().getUndoManager().canUndo())
this.executable.bind(ActionHelper.needsDatabase(stateManager));
stateManager.activeTabProperty().addListener((observable, oldValue, activeLibraryTab) -> {
Copy link
Member

Choose a reason for hiding this comment

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

This will add a listener after each tab change. The old listener should be removed. Otherwise, memory consumption will increase IMHO.

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.

Only have active buttons for undo/redo if there is something to undo/redo
4 participants