From 29cb632b5c33787f9dc6e7c6e6cd4e475fd12b72 Mon Sep 17 00:00:00 2001
From: Cyrille Valladeau <cyrille.valladeau@c-s.fr>
Date: Thu, 5 Jan 2012 11:08:42 +0100
Subject: [PATCH] ENH: make the last opened image selected

---
 Code/Visualization/Viewer/View/otbViewerViewGUI.cxx | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Code/Visualization/Viewer/View/otbViewerViewGUI.cxx b/Code/Visualization/Viewer/View/otbViewerViewGUI.cxx
index 13c503d9f5..5f70808616 100644
--- a/Code/Visualization/Viewer/View/otbViewerViewGUI.cxx
+++ b/Code/Visualization/Viewer/View/otbViewerViewGUI.cxx
@@ -75,6 +75,10 @@ ViewerViewGUI
   unsigned int numberOfOpenedImages = m_ViewerController->OpenInputImage(inputFileName);
  //Initialize
   this->Initialize(numberOfOpenedImages);
+
+  // Select the last opened image
+  guiImageList->value( guiImageList->size() );
+  this->SelectAction();
 }
 
 /**
-- 
GitLab