diff --git a/platform-independent/java/gui/src/main/java/com/lyndir/masterpassword/gui/view/UserContentPanel.java b/platform-independent/java/gui/src/main/java/com/lyndir/masterpassword/gui/view/UserContentPanel.java index 72700244..fb9bdb67 100644 --- a/platform-independent/java/gui/src/main/java/com/lyndir/masterpassword/gui/view/UserContentPanel.java +++ b/platform-independent/java/gui/src/main/java/com/lyndir/masterpassword/gui/view/UserContentPanel.java @@ -901,6 +901,12 @@ public class UserContentPanel extends JPanel implements State.Listener, MPUser.L private void showSiteItem(@Nullable final MPQuery.Result> item) { MPSite site = (item != null)? item.getValue(): null; Res.ui( getSiteResult( site, showLogin ), result -> { + settingsButton.setEnabled( site != null ); + questionsButton.setEnabled( site != null ); + editButton.setEnabled( site != null ); + keyButton.setEnabled( site != null ); + deleteButton.setEnabled( site != null ); + if (!showLogin && (site != null)) resultLabel.setText( (result != null)? strf( "Your password for %s:", site.getSiteName() ): " " ); else if (showLogin && (site != null)) @@ -912,11 +918,6 @@ public class UserContentPanel extends JPanel implements State.Listener, MPUser.L resultField.setText( EACH_CHARACTER.matcher( result ).replaceAll( "•" ) ); else resultField.setText( result ); - settingsButton.setEnabled( result != null ); - questionsButton.setEnabled( result != null ); - editButton.setEnabled( result != null ); - keyButton.setEnabled( result != null ); - deleteButton.setEnabled( result != null ); } ); }