- Timestamp:
- 1/10/2010 8:36:05 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/6.0/Eraser.DefaultPlugins/CustomMethodEditorForm.cs
r1360 r1493 170 170 private void passesAddBtn_Click(object sender, EventArgs e) 171 171 { 172 //Save the current pass being edited 173 if (currentPass != null) 174 SavePass(currentPass); 175 176 //Then create a new, random pass, adding it to the list 172 177 ErasureMethodPass pass = new ErasureMethodPass(ErasureMethod.WriteRandom, null); 173 178 ListViewItem item = AddPass(pass); 174 179 180 //If a pass is currently selected, insert the pass after the currently selected one. 175 181 if (passesLv.SelectedIndices.Count > 0) 176 182 { 177 183 item.Remove(); 178 passesLv.Items.Insert(passesLv.SelectedIndices[passesLv.SelectedIndices.Count - 1] ,184 passesLv.Items.Insert(passesLv.SelectedIndices[passesLv.SelectedIndices.Count - 1] + 1, 179 185 item); 180 186 RenumberPasses(); … … 192 198 private void passesDuplicateBtn_Click(object sender, EventArgs e) 193 199 { 200 //Save the current pass to prevent data loss 201 SavePass(currentPass); 202 194 203 foreach (ListViewItem item in passesLv.SelectedItems) 195 204 { … … 253 262 { 254 263 if (e.Item == currentPass) 264 { 255 265 SavePass(e.Item); 266 currentPass = null; 267 } 256 268 } 257 269 else if (passesLv.SelectedIndices.Count == 1)
Note: See TracChangeset
for help on using the changeset viewer.
