summaryrefslogtreecommitdiff
path: root/ui/folder_history_box.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ui/folder_history_box.cpp')
-rw-r--r--ui/folder_history_box.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/ui/folder_history_box.cpp b/ui/folder_history_box.cpp
index 76ed785e..72204c3a 100644
--- a/ui/folder_history_box.cpp
+++ b/ui/folder_history_box.cpp
@@ -146,18 +146,12 @@ void FolderHistoryBox::OnMouseWheel(wxMouseEvent& event)
//redirect to parent scrolled window!
wxWindow* wnd = this;
- for (;;)
- {
- wnd = wnd->GetParent();
- if (!wnd)
- break;
-
+ while ((wnd = wnd->GetParent()) != nullptr) //silence MSVC warning
if (dynamic_cast<wxScrolledWindow*>(wnd) != nullptr)
{
wnd->GetEventHandler()->AddPendingEvent(event);
break;
}
- }
// event.Skip();
}
bgstack15