mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-14 05:06:16 +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_up_throttle(int throttle);
|
||||||
void adjust_down_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:
|
private:
|
||||||
Download(const Download&);
|
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);
|
return dynamic_cast<ElementDownloadList*>(m_uiArray[DISPLAY_DOWNLOAD_LIST])->receive_change_view(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This should also do focus_next() or something.
|
|
||||||
void
|
void
|
||||||
DownloadList::unfocus_download(core::Download* d) {
|
DownloadList::unfocus_download(core::Download* d) {
|
||||||
if (m_state == DISPLAY_DOWNLOAD)
|
if (m_state == DISPLAY_DOWNLOAD) {
|
||||||
activate_display(DISPLAY_DOWNLOAD_LIST);
|
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)
|
if (*current_view()->focus() == d && current_view()->focus() < current_view()->end_visible()) {
|
||||||
return;
|
current_view()->next_focus();
|
||||||
|
}
|
||||||
current_view()->next_focus();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user