Skip to content

Commit e4a64e4

Browse files
committed
Don't allow focusing TagLabel container itself
Fixes #875.
1 parent 6c2d9d9 commit e4a64e4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/editing_area.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ class EditingArea::TagLabel : public wxPanel
180180
Ellipsize
181181
};
182182

183+
bool AcceptsFocus() const override
184+
{
185+
return wxPanel::AcceptsFocus();
186+
}
187+
183188
TagLabel(wxWindow *parent, Color fg, Color bg, wxWindowID labelChildID = wxID_ANY) : wxPanel(parent, wxID_ANY)
184189
{
185190
m_icon = nullptr;
@@ -208,6 +213,8 @@ class EditingArea::TagLabel : public wxPanel
208213
#endif
209214
UpdateColor();
210215
});
216+
217+
m_container.DisableSelfFocus();
211218
}
212219

213220
void SetLabel(const wxString& text) override

0 commit comments

Comments
 (0)