View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000548 | Double Commander | Default | public | 2012-08-26 11:23 | 2017-09-04 08:25 |
Reporter | pktfag | Assigned To | cobines | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Projection | none | ETA | none | ||
OS | linux,windows | ||||
Product Version | 0.6.0 (trunk) | Product Build | 4944 | ||
Fixed in Version | 0.5.5 | ||||
Summary | 0000548: Error occurs when delete only one element in search templates | ||||
Description | Patch in onlyone.diff | ||||
Steps To Reproduce | Try to delete only one element in search dialog in "Load/Save" Error: TListBox Index 0 out of bounds 0 .. -1 | ||||
Tags | No tags attached. | ||||
Attached Files | onlyone.diff (880 bytes)
# HG changeset patch # User Oleg Khlystov <pktfag@gmail.com> # Date 1345964682 -14400 # Node ID a7c47c58b39ad7265e66f1b1d3e25350cf8ab391 # Parent 4e2972c576048ab6857c65fb6f962485f8eb8f6a FIX: error occurs when delete last element in search templates diff -r 4e2972c57604 -r a7c47c58b39a src/fFindDlg.pas --- a/src/fFindDlg.pas Sun Aug 26 10:31:06 2012 +0400 +++ b/src/fFindDlg.pas Sun Aug 26 11:04:42 2012 +0400 @@ -1326,8 +1326,12 @@ begin OldIndex := lbSearchTemplates.ItemIndex; gSearchTemplateList.LoadToStringList(lbSearchTemplates.Items); - if OldIndex <> -1 then - lbSearchTemplates.ItemIndex := OldIndex; + if lbSearchTemplates.Count > 0 then begin + if OldIndex = 0 then + lbSearchTemplates.ItemIndex := OldIndex + else + lbSearchTemplates.ItemIndex := OldIndex - 1; + end; end; procedure TfrmFindDlg.ZVDateFromChange(Sender: TObject); | ||||
Fixed in Revision | 4990 | ||||
Operating system | Windows, Linux | ||||
Widgetset | Win32, GTK2 | ||||
Architecture | 32-bit, 64-bit | ||||
|
Currently selected template should be restored by template name and not by index. Because some completely different template can be loaded instead of required when restored by index. |
|
Different template can be loaded instead of required by clicking button "Load". |
|
I did it differently, so that it only affects deleting. |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-08-26 11:23 | pktfag | New Issue | |
2012-08-26 11:23 | pktfag | File Added: onlyone.diff | |
2012-08-27 15:20 | vitaliyg | Note Added: 0000867 | |
2012-08-31 12:44 | pktfag | Note Added: 0000868 | |
2012-10-07 11:05 | cobines | Fixed in Revision | => 4990 |
2012-10-07 11:05 | cobines | Note Added: 0000944 | |
2012-10-07 11:05 | cobines | Status | new => resolved |
2012-10-07 11:05 | cobines | Fixed in Version | => 0.5.5 |
2012-10-07 11:05 | cobines | Resolution | open => fixed |
2012-10-07 11:05 | cobines | Assigned To | => cobines |
2017-09-04 08:25 | Alexx2000 | Status | resolved => closed |