Ticket #7466: update_patch

File update_patch, 1.4 KB (added by Nitin Kumar Gautam, 12 years ago)

Patch for the Bug in the file filteredit.cpp

Line 
1--- Downloads/filezilla-3.5.3/src/interface/filteredit.cpp 2012-09-03 22:15:19.000000000 +0530
2+++ Desktop/src/interface/filteredit.cpp 2011-08-30 09:00:23.000000000 +0530
3@@ -215,38 +215,10 @@
4 wxMessageBox(_("The entered filter name already exists, please choose a different name."), _("Filter name already exists"), wxICON_ERROR, this);
5 return;
6 }
7-
8- int item = m_currentSelection;
9-
10- SaveFilter(m_filters[m_currentSelection]);
11- CFilter filter = m_filters[m_currentSelection];
12-
13- filter.name = newName;
14-
15- m_pFilterListCtrl->Delete(item);
16- m_filters.erase(m_filters.begin() + item);
17-
18- // Remote filter from all filter sets
19- for (std::vector<CFilterSet>::iterator iter = m_filterSets.begin(); iter != m_filterSets.end(); iter++)
20- {
21- CFilterSet& set = *iter;
22- set.local.erase(set.local.begin() + item);
23- set.remote.erase(set.remote.begin() + item);
24- }
25-
26-
27- m_filters.push_back(filter);
28- for (std::vector<CFilterSet>::iterator iter = m_filterSets.begin(); iter != m_filterSets.end(); iter++)
29- {
30- CFilterSet& set = *iter;
31- set.local.push_back(false);
32- set.remote.push_back(false);
33- }
34
35- item = m_pFilterListCtrl->Append(newName);
36- m_pFilterListCtrl->Select(item);
37- wxCommandEvent evt;
38- OnFilterSelect(evt);
39+ m_pFilterListCtrl->Delete(m_currentSelection);
40+ m_pFilterListCtrl->Insert(newName, m_currentSelection);
41+ m_pFilterListCtrl->Select(m_currentSelection);
42 }
43
44 void CFilterEditDialog::OnCopy(wxCommandEvent& event)