Ticket #11819: filezilla_subdir_selected.patch
File filezilla_subdir_selected.patch, 4.5 KB (added by , 6 years ago) |
---|
-
src/interface/LocalListView.cpp
1288 1288 for (unsigned int i = 0; i < m_indexMapping.size(); ++i) { 1289 1289 const CLocalFileData &data = m_fileData[m_indexMapping[i]]; 1290 1290 if (data.name == focused) { 1291 SetItemState(i, wxLIST_STATE_FOCUSED , wxLIST_STATE_FOCUSED);1291 SetItemState(i, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED); 1292 1292 if (ensureVisible) { 1293 1293 EnsureVisible(i); 1294 1294 } … … 1300 1300 if (focusedItem >= GetItemCount()) { 1301 1301 --focusedItem; 1302 1302 } 1303 SetItemState(focusedItem, wxLIST_STATE_FOCUSED , wxLIST_STATE_FOCUSED);1303 SetItemState(focusedItem, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED); 1304 1304 } 1305 1305 return; 1306 1306 } … … 1312 1312 while (++i < (int)m_indexMapping.size()) { 1313 1313 const CLocalFileData &data = m_fileData[m_indexMapping[i]]; 1314 1314 if (data.name == focused) { 1315 SetItemState(i, wxLIST_STATE_FOCUSED , wxLIST_STATE_FOCUSED);1315 SetItemState(i, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED); 1316 1316 if (ensureVisible) { 1317 1317 EnsureVisible(i); 1318 1318 } … … 1346 1346 } 1347 1347 if (!focused.empty()) { 1348 1348 if (firstSelected != -1) { 1349 SetItemState(firstSelected, wxLIST_STATE_FOCUSED , wxLIST_STATE_FOCUSED);1349 SetItemState(firstSelected, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED); 1350 1350 } 1351 1351 else { 1352 1352 if (GetItemCount() != 0) { … … 1356 1356 else if (focusedItem >= GetItemCount()) { 1357 1357 focusedItem = GetItemCount() - 1; 1358 1358 } 1359 SetItemState(focusedItem, wxLIST_STATE_FOCUSED , wxLIST_STATE_FOCUSED);1359 SetItemState(focusedItem, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED); 1360 1360 } 1361 1361 } 1362 1362 } … … 1959 1959 1960 1960 std::wstring error; 1961 1961 if (!m_state.SetLocalDir(_T(".."), &error)) { 1962 1962 1963 if (!error.empty()) { 1963 1964 wxMessageBoxEx(error, _("Failed to change directory"), wxICON_INFORMATION); 1964 1965 } -
src/interface/RemoteListView.cpp
2061 2061 2062 2062 if (focused == L"..") { 2063 2063 focused.clear(); 2064 SetItemState(0, wxLIST_STATE_FOCUSED , wxLIST_STATE_FOCUSED);2064 SetItemState(0, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED); 2065 2065 } 2066 2066 2067 2067 if (selectedNames.empty()) { … … 2076 2076 } 2077 2077 2078 2078 if ((*m_pDirectoryListing)[index].name == focused) { 2079 SetItemState(i, wxLIST_STATE_FOCUSED , wxLIST_STATE_FOCUSED);2079 SetItemState(i, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED); 2080 2080 if (ensureVisible) { 2081 2081 EnsureVisible(i); 2082 2082 } … … 2088 2088 if (focusedItem >= GetItemCount()) { 2089 2089 --focusedItem; 2090 2090 } 2091 SetItemState(focusedItem, wxLIST_STATE_FOCUSED , wxLIST_STATE_FOCUSED);2091 SetItemState(focusedItem, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED); 2092 2092 } 2093 2093 2094 2094 return; … … 2097 2097 auto nameIt = selectedNames.cbegin(); 2098 2098 if (*nameIt == L"..") { 2099 2099 ++nameIt; 2100 SetItemState(0, wxLIST_STATE_SELECTED ,wxLIST_STATE_SELECTED);2100 SetItemState(0, wxLIST_STATE_SELECTED|wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED|wxLIST_STATE_SELECTED); 2101 2101 } 2102 2102 2103 2103 int firstSelected = -1; … … 2114 2114 } 2115 2115 CDirentry const& entry = (*m_pDirectoryListing)[index]; 2116 2116 if (entry.name == focused) { 2117 SetItemState(i, wxLIST_STATE_FOCUSED , wxLIST_STATE_FOCUSED);2117 SetItemState(i, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED); 2118 2118 if (ensureVisible) { 2119 2119 EnsureVisible(i); 2120 2120 } … … 2148 2148 } 2149 2149 if (!focused.empty()) { 2150 2150 if (firstSelected != -1) { 2151 SetItemState(firstSelected, wxLIST_STATE_FOCUSED , wxLIST_STATE_FOCUSED);2151 SetItemState(firstSelected, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED); 2152 2152 } 2153 2153 else { 2154 2154 if (GetItemCount() != 0) { … … 2158 2158 else if (focusedItem >= GetItemCount()) { 2159 2159 focusedItem = GetItemCount() - 1; 2160 2160 } 2161 SetItemState(focusedItem, wxLIST_STATE_FOCUSED , wxLIST_STATE_FOCUSED);2161 SetItemState(focusedItem, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED); 2162 2162 } 2163 2163 } 2164 2164 }