Skip to content

Commit 187ef74

Browse files
pluto-hanSiedlerchrcalixtus
authored andcommitted
Fix: exception dialog shows up when moving sidepanel down/up (JabRef#15248)
* fix exception dialog when moving panel down/up * update CHANGELOG.md * Apply suggestion from @Siedlerchr Co-authored-by: Christoph <siedlerkiller@gmail.com> * Stylistic change --------- Co-authored-by: Christoph <siedlerkiller@gmail.com> Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com> Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
1 parent 2a0ae53 commit 187ef74

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
2727
### Fixed
2828

2929
- We fixed an issue where pressing ESC now properly closes the global search dialog. [#15133](https://github.com/JabRef/jabref/issues/15133)
30+
- We fixed an issue where an exception dialog was shown when moving side panels down/up. [#15207](https://github.com/JabRef/jabref/issues/15207)
3031
- We fixed a false "Invalid citation key" warning for keys with diacritical marks. [#14953](https://github.com/JabRef/jabref/issues/14953)
3132
- We fixed an issue where duplicate fields can be created. [#15130](https://github.com/JabRef/jabref/issues/15130)
3233
- We fixed an issue where blank fields could be created. [#15130](https://github.com/JabRef/jabref/issues/15130)

jabgui/src/main/java/org/jabref/gui/frame/SidePanePreferences.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.jabref.gui.frame;
22

3+
import java.util.EnumMap;
34
import java.util.EnumSet;
45
import java.util.Map;
56
import java.util.Set;
@@ -20,8 +21,10 @@ public class SidePanePreferences {
2021
public SidePanePreferences(Set<SidePaneType> visiblePanes,
2122
Map<SidePaneType, Integer> preferredPositions,
2223
int webSearchFetcherSelected) {
23-
this.visiblePanes = FXCollections.observableSet(visiblePanes);
24-
this.preferredPositions = FXCollections.observableMap(preferredPositions);
24+
this.visiblePanes = FXCollections.observableSet(EnumSet.noneOf(SidePaneType.class));
25+
this.visiblePanes.addAll(visiblePanes);
26+
this.preferredPositions = FXCollections.observableMap(new EnumMap<>(SidePaneType.class));
27+
this.preferredPositions.putAll(preferredPositions);
2528
this.webSearchFetcherSelected = new SimpleIntegerProperty(webSearchFetcherSelected);
2629
}
2730

0 commit comments

Comments
 (0)