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 freezes in entry editor #4351

Merged
merged 1 commit into from
Sep 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/main/java/org/jabref/JabRefGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.jabref.model.database.shared.DatabaseNotSupportedException;
import org.jabref.preferences.JabRefPreferences;

import impl.org.controlsfx.skin.DecorationPane;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -143,7 +144,12 @@ private void openWindow(Stage mainStage) {
mainStage.setHeight(Globals.prefs.getDouble(JabRefPreferences.SIZE_Y));
}

Scene scene = new Scene(JabRefGUI.mainFrame, 800, 800);
// We create a decoration pane ourselves for performance reasons
// (otherwise it has to be injected later, leading to a complete redraw/relayout of the complete scene)
DecorationPane root = new DecorationPane();
root.getChildren().add(JabRefGUI.mainFrame);

Scene scene = new Scene(root, 800, 800);
Globals.getThemeLoader().installBaseCss(scene, Globals.prefs);
mainStage.setTitle(JabRefFrame.FRAME_TITLE);
mainStage.getIcons().addAll(IconTheme.getLogoSetFX());
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/org/jabref/gui/fieldeditors/PersonsEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import javafx.scene.Parent;
import javafx.scene.control.TextInputControl;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;

import org.jabref.gui.autocompleter.AutoCompleteSuggestionProvider;
import org.jabref.gui.autocompleter.AutoCompletionTextInputBinding;
Expand All @@ -27,7 +26,7 @@ public PersonsEditor(final String fieldName,
textInput = isSingleLine
? new EditorTextField()
: new EditorTextArea();
HBox.setHgrow(textInput, Priority.ALWAYS);

textInput.textProperty().bindBidirectional(viewModel.textProperty());
((ContextMenuAddable) textInput).addToContextMenu(EditorMenus.getNameMenu(textInput));
this.getChildren().add(textInput);
Expand Down