Changeset 480 in PSPA for Interface_Web/trunk
- Timestamp:
- Jan 8, 2014, 5:19:17 PM (11 years ago)
- Location:
- Interface_Web/trunk/pspaWT
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/History
r479 r480 5 5 PSPA - Plateforme de simulation en physique des accélérateurs 6 6 ========================================================= 7 8 08 Janvier 2014 : Laurent Garnier 9 - sectionToExecute : Ameliorations dans le changement du début des sections 10 - dataManager : Ajout d'une protection dans executeAll() 11 - GWt_sectionToExecute : BUGFIX: Memory leak résolu ici. Lors du changement d'une section, on demandait au secteur qui contient à le section de toute redessiner(y compris la section courante qui était supprimée), cela revenait à couper la branche sur laquelle ont était assis. Désormais, on passe par un signal. 12 - GWt_sector : Changement de privé à public de displayWidgetBeamLine() 7 13 8 14 07 Janvier 2014 : Laurent Garnier -
Interface_Web/trunk/pspaWT/sources/controler/include/sectionToExecute.h
r476 r480 51 51 bool insertAfter(abstractElement*,abstractElement*); 52 52 53 inline boolinsertAtFirst(abstractElement* abs) {53 inline void insertAtFirst(abstractElement* abs) { 54 54 elements_.insert ( elements_.begin() ,abs); 55 55 }; 56 56 57 inline void removeFirstElement() { 58 elements_.erase(elements_.begin()); 59 }; 60 61 inline void insertAtLast(abstractElement* abs) { 62 elements_.push_back(abs); 63 }; 64 57 65 /** Set the first element of this section. 58 66 If needed, it will change the last element of the previous section -
Interface_Web/trunk/pspaWT/sources/controler/src/dataManager.cc
r479 r480 135 135 } 136 136 137 if ( success ) {137 if ( success && (diagnosticBeam_.size() > 0)) { 138 138 sector->setParticleBeam(&diagnosticBeam_.at(indexElementToIndexDiag_.back())); 139 139 cout << " execute termine avec succes " << endl; -
Interface_Web/trunk/pspaWT/sources/controler/src/sectionToExecute.cc
r476 r480 119 119 std::vector< abstractElement* > elemsVect = sectVect[a]->getElements(); 120 120 long stop = 0; 121 long start = elemsVect.size(); 121 122 if (a == newBeginSectionNumber) { 122 123 stop = indexOfNewBeginSectionNumber; 123 124 } 124 for (long elemIndex = elemsVect.size(); elemIndex > stop; elemIndex--) {125 for (long elemIndex = start; elemIndex > stop; elemIndex--) { 125 126 insertAtFirst(elemsVect.back()); 126 127 elemsVect.pop_back(); … … 132 133 133 134 // Moved in the same section : 134 } else if ( newBeginSectionNumber == sectionNumber ) { 135 } else if (( newBeginSectionNumber == sectionNumber ) && (sectionNumber > 0)){ 136 for (long elemIndex = 0; elemIndex < indexOfNewBeginSectionNumber; elemIndex++) { 137 sectVect[sectionNumber-1]->insertAtLast(elements_.front()); 138 removeFirstElement(); 139 } 135 140 136 141 -
Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_sectionToExecute.h
r476 r480 5 5 #include <Wt/WComboBox> 6 6 #include <Wt/WText> 7 #include <Wt/WSignal> 7 8 8 9 class GWt_softwarePanel; … … 50 51 } 51 52 53 Wt::Signal<void> redraw_; 54 52 55 private : 53 56 -
Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_sector.h
r469 r480 39 39 }; 40 40 41 /** 42 Display the content of this sector. Create a widget for the beamline and the softwares 43 */ 44 void displayWidgetBeamLine(); 45 41 46 private : 42 47 GWt_ligneFaisceau* UI_beamLine_; 43 48 void setIcon(WLayout*); 44 void displayWidgetBeamLine();45 49 GWt_accelerator* UI_Accelerator_; 46 50 sector* sectorControler_; -
Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_softwarePanel.h
r471 r480 29 29 virtual ~GWt_softwarePanel(); 30 30 31 /** 32 Read all sectionToExecute from the controler and build a newsoftware panel with it 33 */ 31 34 void displayFromControler(); 32 35 void updateSections(); -
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_sectionToExecute.cc
r476 r480 94 94 // lastElement->activated().connect(softwarePanel,&GWt_softwarePanel::updateSections); 95 95 softElement_->activated().connect(this,&GWt_sectionToExecute::setSoftware); 96 this->redraw_.connect(UIsector_,&GWt_sector::displayWidgetBeamLine); 96 97 97 98 manageWarningsAndErrors(); … … 155 156 156 157 section_->setFirstElement(firstElement_->currentIndex()); 157 UIsector_->getExecuteWidget()->displayFromControler(); 158 UIsector_->getBeamLineWidget()->buildBeamLineWidget(); 158 redraw_.emit(); 159 159 } -
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_sector.cc
r455 r480 15 15 { 16 16 setIcon(UI_Accelerator_->getAcceleratorGlobalViewLayout()); 17 displayWidgetBeamLine(); 17 18 } 18 19 -
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc
r474 r480 108 108 GWt_sectionToExecute* newSection = new GWt_sectionToExecute(lineFromCombo,lineToCombo,softCombo,createAddDeletePushButtons(a),UIsector_->getSectorControler()->getSectionsToExecute()[a],UIsector_); 109 109 110 /* // FIXME ?111 stringstream st;112 st << UIsectionsToExecute_deprecated_.size();113 114 // this is the mean to identify this section!115 newSection->setObjectName(st.str());116 117 // push back on sections vector118 UIsectionsToExecute_deprecated_.push_back(newSection);119 */110 /* // FIXME ? 111 stringstream st; 112 st << UIsectionsToExecute_deprecated_.size(); 113 114 // this is the mean to identify this section! 115 newSection->setObjectName(st.str()); 116 117 // push back on sections vector 118 UIsectionsToExecute_deprecated_.push_back(newSection); 119 */ 120 120 contenuSections_->addWidget(newSection); 121 // updateSections();122 121 // updateSections(); 122 123 123 firstSectionToExecuteIndex += UIsector_->getSectorControler()->getSectionsToExecute()[a]->getElements().size(); 124 124 }
Note: See TracChangeset
for help on using the changeset viewer.