mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-13 05:32:31 +00:00
only redraw the download list if the deleted download was onscreen
This commit is contained in:
+2
-1
@@ -89,7 +89,8 @@ public:
|
||||
void adjust_up_throttle(int throttle);
|
||||
void adjust_down_throttle(int throttle);
|
||||
|
||||
display::Window* window() { return NULL; }
|
||||
display::Window* window() { return NULL; }
|
||||
core::Download* download() { return m_download; };
|
||||
|
||||
private:
|
||||
Download(const Download&);
|
||||
|
||||
@@ -124,16 +124,17 @@ DownloadList::set_current_view(const std::string& name) {
|
||||
return dynamic_cast<ElementDownloadList*>(m_uiArray[DISPLAY_DOWNLOAD_LIST])->receive_change_view(name);
|
||||
}
|
||||
|
||||
// This should also do focus_next() or something.
|
||||
void
|
||||
DownloadList::unfocus_download(core::Download* d) {
|
||||
if (m_state == DISPLAY_DOWNLOAD)
|
||||
activate_display(DISPLAY_DOWNLOAD_LIST);
|
||||
if (m_state == DISPLAY_DOWNLOAD) {
|
||||
if (d == static_cast<Download*>(m_uiArray[DISPLAY_DOWNLOAD])->download()) {
|
||||
activate_display(DISPLAY_DOWNLOAD_LIST);
|
||||
}
|
||||
}
|
||||
|
||||
if (current_view()->focus() >= current_view()->end_visible() || *current_view()->focus() != d)
|
||||
return;
|
||||
|
||||
current_view()->next_focus();
|
||||
if (*current_view()->focus() == d && current_view()->focus() < current_view()->end_visible()) {
|
||||
current_view()->next_focus();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user