Handle case if content item is used in settings (wizard not set)

This commit is contained in:
Manfred Karrer 2014-11-27 00:36:49 +01:00
parent c4295bc55e
commit 3f5d82f8b0
6 changed files with 11 additions and 10 deletions

View file

@ -151,6 +151,7 @@ public class FiatAccountView extends ActivatableViewAndModel<GridPane, FiatAccou
@FXML @FXML
void onCompleted() { void onCompleted() {
if (wizard != null)
wizard.nextStep(this); wizard.nextStep(this);
} }

View file

@ -152,7 +152,7 @@ public class IrcAccountView extends ActivatableViewAndModel<GridPane, IrcAccount
@FXML @FXML
void onSave() { void onSave() {
if (model.requestSaveBankAccount().isValid) if (wizard != null && model.requestSaveBankAccount().isValid)
wizard.nextStep(this); wizard.nextStep(this);
} }

View file

@ -64,7 +64,7 @@ public class PasswordView extends InitializableView<GridPane, PasswordViewModel>
@FXML @FXML
private void onSaved() { private void onSaved() {
if (model.requestSavePassword()) if (wizard != null && model.requestSavePassword())
wizard.nextStep(this); wizard.nextStep(this);
else else
log.debug(model.getErrorMessage()); // TODO use validating passwordTF log.debug(model.getErrorMessage()); // TODO use validating passwordTF
@ -72,6 +72,7 @@ public class PasswordView extends InitializableView<GridPane, PasswordViewModel>
@FXML @FXML
private void onSkipped() { private void onSkipped() {
if (wizard != null)
wizard.nextStep(this); wizard.nextStep(this);
} }

View file

@ -109,11 +109,8 @@ public class RegistrationView extends InitializableView<GridPane, RegistrationVi
@Override @Override
public void handle(ActionEvent actionEvent) { public void handle(ActionEvent actionEvent) {
getProperties().put("type", "CLOSE"); getProperties().put("type", "CLOSE");
try { if (wizard != null)
wizard.nextStep(RegistrationView.this); wizard.nextStep(RegistrationView.this);
} catch (Exception e) {
e.printStackTrace();
}
Dialog.Actions.CLOSE.handle(actionEvent); Dialog.Actions.CLOSE.handle(actionEvent);
overlayManager.removeBlurContent(); overlayManager.removeBlurContent();
} }

View file

@ -130,6 +130,7 @@ public class RestrictionsView extends ActivatableViewAndModel<GridPane, Restrict
@FXML @FXML
private void onCompleted() { private void onCompleted() {
if (wizard != null)
wizard.nextStep(this); wizard.nextStep(this);
} }

View file

@ -60,6 +60,7 @@ public class SeedWordsView extends InitializableView<GridPane, SeedWordsViewMode
@FXML @FXML
private void onCompleted() { private void onCompleted() {
if (wizard != null)
wizard.nextStep(this); wizard.nextStep(this);
} }