From 78a5c48fd39086dc4de45b5fac08ec5cefc991d2 Mon Sep 17 00:00:00 2001 From: Drew Short Date: Thu, 28 Aug 2014 20:29:46 -0500 Subject: [PATCH] Fixed the listeners not be attached the first time. DOH! --- .../ui/controller/AppController.scala | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/gui/src/main/scala/com/sothr/imagetools/ui/controller/AppController.scala b/gui/src/main/scala/com/sothr/imagetools/ui/controller/AppController.scala index 6cb0728..a6619c7 100644 --- a/gui/src/main/scala/com/sothr/imagetools/ui/controller/AppController.scala +++ b/gui/src/main/scala/com/sothr/imagetools/ui/controller/AppController.scala @@ -54,20 +54,20 @@ class AppController extends Logging { if (PropertiesService.has("lastPath")) { currentDirectory = PropertiesService.get("lastPath", ".") selectedDirectoryLabel.setText(PropertiesService.get("lastPath", "")) - - //setup the engine listener - val system: ActorSystem = AppConfig.getAppActorSystem - val guiListenerProps: Props = Props.create(classOf[GUIEngineListener]) - val guiListener: ActorRef = system.actorOf(guiListenerProps) - // configure the listener - guiListener ! SetupListener(progressBar, progressLabel) - // tell the engine to use our listener - this.engine.setProcessedListener(guiListener) - this.engine.setSimilarityListener(guiListener) - // Initialize the progress label - guiListener ! SubmitMessage("Initialized System... Ready!") } + //setup the engine listener + val system: ActorSystem = AppConfig.getAppActorSystem + val guiListenerProps: Props = Props.create(classOf[GUIEngineListener]) + val guiListener: ActorRef = system.actorOf(guiListenerProps) + // configure the listener + guiListener ! SetupListener(progressBar, progressLabel) + // tell the engine to use our listener + this.engine.setProcessedListener(guiListener) + this.engine.setSimilarityListener(guiListener) + // Initialize the progress label + guiListener ! SubmitMessage("Initialized System... Ready!") + //test //val testImage = new Image() //testImage.setThumbnailPath("test.jpg")