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

Fix the preview panel showing the wrong entry (an entry that is not selected in the entry table) #10728

Merged
merged 3 commits into from
Dec 27, 2023

Conversation

HoussemNasri
Copy link
Member

@HoussemNasri HoussemNasri commented Dec 27, 2023

Fix #9172

Bug Summary

In PreviewViewer, both setEntry and setLayout will assign the entry and layout fields respectively and call the update method to reflect the new UI state. The thing is that update would start a background task to update the UI. The setLayout method would run the update UI background task on the previous entry because the entry field assignment happens in setEntry. While setEntry would run the task with the new entry. The bug happens when the task started by the setLayout method finishes last which will result in the overriding of the display of the new entry preview made by setEntry.

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.

calixtus
calixtus previously approved these changes Dec 27, 2023
@Siedlerchr Siedlerchr added this pull request to the merge queue Dec 27, 2023
@Siedlerchr
Copy link
Member

Thanks for digging into it and fixing it! Really great

Merged via the queue into JabRef:main with commit 95430be Dec 27, 2023
18 checks passed
Siedlerchr added a commit to jlauber18/jabref that referenced this pull request Jan 1, 2024
* upstream/main: (334 commits)
  Update CSL styles (JabRef#10734)
  Fix the preview panel showing the wrong entry (an entry that is not selected in the entry table) (JabRef#10728)
  Fix cancelling ignored when generating an entry from id (JabRef#10727)
  Merge split localization string (JabRef#10712)
  Downgrade jfx 21.0.1 to jfx 21
  Bump actions/upload-pages-artifact from 2 to 3 (JabRef#10723)
  Bump actions/deploy-pages from 3 to 4 (JabRef#10722)
  Bump org.glassfish.jersey.core:jersey-server from 3.1.4 to 3.1.5 (JabRef#10720)
  Bump com.fasterxml.jackson.dataformat:jackson-dataformat-yaml (JabRef#10717)
  Bump org.apache.pdfbox:pdfbox from 3.0.0 to 3.0.1 (JabRef#10721)
  Bump org.postgresql:postgresql from 42.6.0 to 42.7.1 (JabRef#10718)
  Bump org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2 (JabRef#10719)
  update snapcraft update bug report template
  Show development information
  Release v5.12
  Release v5.12
  add jspecify
  exclude junit jupiter
  Add external libraries
  Update CSL styles (JabRef#10714)
  ...

# Conflicts:
#	src/main/java/org/jabref/gui/externalfiles/ImportHandler.java
#	src/main/java/org/jabref/preferences/GuiPreferences.java
#	src/main/java/org/jabref/preferences/JabRefPreferences.java
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.

Preview out of sync with entry table
3 participants