From a0ab80a846bd9316c0b68c0fb35ed1b4ed434619 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Thu, 1 Aug 2024 20:03:03 +0200 Subject: [PATCH] Add support for inheritance of dialogs --- src/main/java/com/airhacks/afterburner/views/ViewLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/airhacks/afterburner/views/ViewLoader.java b/src/main/java/com/airhacks/afterburner/views/ViewLoader.java index 283f9a2..125daf0 100644 --- a/src/main/java/com/airhacks/afterburner/views/ViewLoader.java +++ b/src/main/java/com/airhacks/afterburner/views/ViewLoader.java @@ -112,7 +112,7 @@ private static ExecutorService getExecutorService() { public ViewLoader controller(Object root) { PresenterFactory factory = PresenterFactory.discover(); fxmlLoader.setControllerFactory(type -> { - if (type == root.getClass()) { + if (type.isAssignableFrom(root.getClass())) { factory.injectMembers(root, f -> null); return root; } else {