Changeset 85 in PSPA for Interface_Web/trunk/pspaWT/src/GWt_pspaApplication.cc
- Timestamp:
- Nov 19, 2012, 1:09:02 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/src/GWt_pspaApplication.cc
r84 r85 150 150 151 151 152 if ( selectedSections_.size() == 0 152 if ( selectedSections_.size() == 0) 153 153 { 154 154 premierText = "1"; … … 157 157 else 158 158 { 159 premierText = selectedSections_.back()->fin->text().toUTF8(); 160 dernierText = premierText; 159 dernierText = selectedSections_.back()->fin->text().toUTF8(); 160 int dernierNumero = atoi(dernierText.c_str()); 161 dernierNumero++; 162 if ( dernierNumero <= dtmanage_->beamLineSize() ) 163 { 164 premierText = mixedTools::intToString(dernierNumero); 165 dernierText = premierText; 166 } 167 else 168 { 169 premierText = mixedTools::intToString( dtmanage_->beamLineSize() ); 170 dernierText = premierText; 171 } 161 172 } 162 173 … … 208 219 { 209 220 if ( selectedSections_.empty() ) return; 221 222 // traitement de la premiere ligne 210 223 (*selectedSections_.begin())->debut->setText("1"); 211 224 string currentString = (*selectedSections_.begin())->fin->text().toUTF8(); … … 215 228 (*selectedSections_.begin())->fin->setText("1"); 216 229 current = 1; 217 currentString = "1";218 230 } 231 current++; 232 if ( current > dtmanage_->beamLineSize() ) current = dtmanage_->beamLineSize(); 233 currentString = mixedTools::intToString(current); 234 235 236 // traitement des suivantes (on avance d'un cran dans la liste) 219 237 list<GWt_sectionToExecute*>::iterator itr, itr0; 220 238 itr0= selectedSections_.begin(); … … 223 241 { 224 242 // string debString = (*itr)->debut->text().toUTF8(); 243 // debut 225 244 (*itr)->debut->setText( currentString ); 226 string finString = (*itr)->fin->text().toUTF8();227 245 // fin 246 string finString = (*itr)->fin->text().toUTF8(); 228 247 if ( atoi(finString.c_str() ) < current) 229 248 { … … 231 250 } 232 251 233 currentString = (*itr)->fin->text().toUTF8(); 234 235 current = atoi ( currentString.c_str() ); 236 252 // preparation de la ligne suivante 253 finString = (*itr)->fin->text().toUTF8(); 254 current = atoi(finString.c_str()) +1; 255 if ( current > dtmanage_->beamLineSize() ) current = dtmanage_->beamLineSize(); 256 currentString = mixedTools::intToString(current); 237 257 } 238 258 exec_go_->setDisabled(false); 239 259 } 240 260
Note: See TracChangeset
for help on using the changeset viewer.