summaryrefslogtreecommitdiff
path: root/src/interface/Component.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface/Component.cpp')
-rw-r--r--src/interface/Component.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/interface/Component.cpp b/src/interface/Component.cpp
index 5db7acc..b2769cc 100644
--- a/src/interface/Component.cpp
+++ b/src/interface/Component.cpp
@@ -148,4 +148,6 @@ void Component::OnMouseWheelInside(int localx, int localy, int d)
Component::~Component()
{
+ if(GetParentWindow()->IsFocused(this))
+ GetParentWindow()->FocusComponent(NULL);
}