Index: /Interface_Web/trunk/pspaWT/History
===================================================================
--- /Interface_Web/trunk/pspaWT/History	(revision 404)
+++ /Interface_Web/trunk/pspaWT/History	(revision 405)
@@ -5,4 +5,7 @@
      PSPA - Plateforme de simulation en physique des accÃ©lÃ©rateurs
      =========================================================
+
+28 Mars : Laurent Garnier
+- Correction de problèmes avec le softwarePanel
 
 27 Mars : Laurent Garnier
@@ -17,4 +20,6 @@
   lors de l'effacement des composants
 - GWt_softwarePanel.cc : Mise en place des comboBox et suppression des dialogBox
+- Ajout d'un fond gris sur l'output
+- 
 
 24 mars 2013 : Guy Le Meur
Index: /Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_softwarePanel.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_softwarePanel.h	(revision 404)
+++ /Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_softwarePanel.h	(revision 405)
@@ -47,5 +47,5 @@
     PspaApplication* pspa_;
 
-    std::vector <GWt_sectionToExecute*> sections;
+    std::vector <GWt_sectionToExecute*> sections_;
 };
 
Index: /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_sectionToExecute.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_sectionToExecute.cc	(revision 404)
+++ /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_sectionToExecute.cc	(revision 405)
@@ -85,4 +85,8 @@
     errorsContainer_->setStyleClass("errorsContainer");
 
+    // resize combo
+    firstElement->setMinimumSize(80,12);
+    lastElement->setMinimumSize(80,12);
+    software->setMinimumSize(80,12);
     
     firstElement->activated().connect(softwarePanel,&GWt_softwarePanel::updateSections);
Index: /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc	(revision 404)
+++ /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc	(revision 405)
@@ -64,10 +64,8 @@
   int dernierIndex = 0;
 
-    // if this is the first section
-  if(dtmanage_->getJobListSize() == 0) {
+    // if there is no section
+  if(sections_.size() == 0) {
       premierElement = pspa_->getBeamLine()->getAbstractElement(0);
-      dernierElement = pspa_->getBeamLine()->getAbstractElement(pspa_->getBeamLine()->getBeamLineSize()-1);
       premierIndex = 0;
-      dernierIndex = pspa_->getBeamLine()->getBeamLineSize()-1;
 
   // if this is not the first :
@@ -78,8 +76,19 @@
       
   } else {
-    int indexOfLastElementOfLastSection = dtmanage_->getJobListAt(dtmanage_->getJobListSize()-1)->getLastElementNumberInSection();
+    dernierElement = pspa_->getBeamLine()->getAbstractElement(pspa_->getBeamLine()->getBeamLineSize()-1);
+    dernierIndex = pspa_->getBeamLine()->getBeamLineSize()-1;
+
+    premierElement = dernierElement;
+    premierIndex = dernierIndex;
+    
+/*    int indexOfLastElementOfLastSection = dtmanage_->getJobListAt(dtmanage_->getJobListSize()-1)->getLastElementNumberInSection();
+
+    
+    // if there are still elements at the end
     if (pspa_->getBeamLine()->getAbstractElement(indexOfLastElementOfLastSection+1) != NULL ) {
       premierIndex = indexOfLastElementOfLastSection+1;
       premierElement = pspa_->getBeamLine()->getAbstractElement(indexOfLastElementOfLastSection+1);
+
+      // if this is the last element
     } else {
       premierIndex = indexOfLastElementOfLastSection;
@@ -87,8 +96,9 @@
         
     }
-    dernierIndex = dtmanage_->getJobListSize()-1;
-    dernierElement = pspa_->getBeamLine()->getAbstractElement(pspa_->getBeamLine()->getBeamLineSize()-1);
-  }
-  
+ */
+  }
+  
+  dernierElement = pspa_->getBeamLine()->getAbstractElement(pspa_->getBeamLine()->getBeamLineSize()-1);
+  dernierIndex = pspa_->getBeamLine()->getBeamLineSize()-1;
   //  cout << "PspaApplication::addSectionToExecute() : " << premierText << " ââ   " << dernierText << endl;
   
@@ -112,4 +122,8 @@
   fillComboWithElements(lineToCombo);
 
+  // set selection
+  lineFromCombo->setCurrentIndex(premierIndex);
+  lineToCombo->setCurrentIndex(dernierIndex);
+
   WComboBox* softCombo = new WComboBox();
   fillComboWithSoftwares(softCombo);
@@ -118,5 +132,5 @@
 
   // push back on sections vector
-  sections.push_back(newSection);
+  sections_.push_back(newSection);
 
   Wt::WContainerWidget* container = new Wt::WContainerWidget();
@@ -236,9 +250,9 @@
   // on impose le depart du calcul au premier element
   string premier = dtmanage_->getLabelFromElementNumero(1);
-  if (sections.size() > 0) {
-    sections[0]->setFirstElementCurrentSelection(premier);
-  }
-  
-  Wt::WString currentString =  sections[0]->getLastElementCurrentText();
+  if (sections_.size() > 0) {
+    sections_[0]->setFirstElementCurrentSelection(premier);
+  }
+  
+  Wt::WString currentString =  sections_[0]->getLastElementCurrentText();
   int current = dtmanage_->getNumeroFromElementLabel(currentString.toUTF8());
   
@@ -248,6 +262,6 @@
     current = dtmanage_->getBeamLineSize();
     currentString =  dtmanage_->getLabelFromElementNumero(current);
-    if (sections.size() > 0) {
-      sections[0]->setLastElementCurrentSelection(currentString);
+    if (sections_.size() > 0) {
+      sections_[0]->setLastElementCurrentSelection(currentString);
 //...
     }
@@ -257,5 +271,5 @@
   
   // traitement des suivantes (on avance d'un cran dans la liste)
-  for (int a = 1; a< sections.size(); a++)
+  for (int a = 1; a< sections_.size(); a++)
     {
       // debut
@@ -267,8 +281,8 @@
         }
       
-      sections[a]->setFirstElementCurrentSelection(currentString);
+      sections_[a]->setFirstElementCurrentSelection(currentString);
 
       // fin
-      string finString =  sections[a]->getLastElementCurrentText().toUTF8();
+      string finString =  sections_[a]->getLastElementCurrentText().toUTF8();
       
       int numeroFin = dtmanage_->getNumeroFromElementLabel( finString);
@@ -312,13 +326,13 @@
   string diagnosticWarnings;
   
-  for (int a = 0; a< sections.size(); a++)
+  for (int a = 0; a< sections_.size(); a++)
   {
-    string debString = sections[a]->getFirstElementCurrentText().toUTF8();
-    string finString = sections[a]->getLastElementCurrentText().toUTF8();
+    string debString = sections_[a]->getFirstElementCurrentText().toUTF8();
+    string finString = sections_[a]->getLastElementCurrentText().toUTF8();
     
     int debut = pspa_->getBeamLine()->getAbstractElementIndexFromLabel(debString)+1; // FIXME : Should NOT be +1
     int fin = pspa_->getBeamLine()->getAbstractElementIndexFromLabel(finString)+1; // FIXME : Should NOT be +1
     
-    nomDeLogiciel prog = nomDeLogiciel ( sections[a]->getSoftwareCurrentText().toUTF8());
+    nomDeLogiciel prog = nomDeLogiciel ( sections_[a]->getSoftwareCurrentText().toUTF8());
     dtmanage_->addSectionToExecute(pspa_->getBeamLine()->getAbstractElement(debut),
                                    debut,
@@ -353,6 +367,6 @@
     }
     // set errors and warnings
-    sections[a]->setErrors(diagnosticErrors);
-    sections[a]->setWarnings(diagnosticWarnings);
+    sections_[a]->setErrors(diagnosticErrors);
+    sections_[a]->setWarnings(diagnosticWarnings);
   }
     
@@ -367,5 +381,5 @@
 
   // delete from User Interface
-  sections.pop_back();
+  sections_.pop_back();
 }
 
@@ -374,16 +388,21 @@
 {
   // update all sections in order to manage new/deleted items
-  for (int a = 0; a< sections.size(); a++) {
-    fillComboWithElements(sections[a]->getFirstElement());
-    fillComboWithElements(sections[a]->getLastElement());
-  }
-  if (sections.size() == 0) {
+  for (int a = 0; a< sections_.size(); a++) {
+    fillComboWithElements(sections_[a]->getFirstElement());
+    fillComboWithElements(sections_[a]->getLastElement());
+
+    sections_[a]->getFirstElement()->setEnabled (true);
+    sections_[a]->getLastElement()->setEnabled (true);
+  }
+  if (sections_.size() == 0) {
     return;
   }
   // the first element will always be the first element of the beamLine
-  sections[0]->getFirstElement()->setCurrentIndex(0);
-  
+  sections_[0]->getFirstElement()->setCurrentIndex(0);
+  sections_[0]->getFirstElement()->setEnabled (false);
+
   // the last element will always be the last element of the beamLine
-  sections[sections.size()-1]->getLastElement()->setCurrentIndex(sections[sections.size()-1]->getLastElement()->count());
+  sections_[sections_.size()-1]->getLastElement()->setCurrentIndex(sections_[sections_.size()-1]->getLastElement()->count());
+  sections_[sections_.size()-1]->getLastElement()->setEnabled (false);
 
   // set default values
@@ -457,4 +476,5 @@
     }
   }
+  cBox->refresh();
 }
 
@@ -469,5 +489,5 @@
     cBox->addItem(nomDeLogiciel(k).getString());
   }
-  
+  cBox->refresh();
 }
 
@@ -492,5 +512,5 @@
   exec_delete->setStyleClass("roundButton");
   exec_delete->setMaximumSize(20,20);
-  exec_add->setToolTip("Remove this section");
+  exec_delete->setToolTip("Remove this section");
 
   buttonContainerLayout->addWidget(exec_add);
