Commit 406029a1 authored by twanvl's avatar twanvl

Inheriting CardViewer from wxPanel was causing problems with the focus

parent 4f33ca07
...@@ -20,7 +20,7 @@ DEFINE_EVENT_TYPE(EVENT_SIZE_CHANGE); ...@@ -20,7 +20,7 @@ DEFINE_EVENT_TYPE(EVENT_SIZE_CHANGE);
// ----------------------------------------------------------------------------- : CardViewer // ----------------------------------------------------------------------------- : CardViewer
CardViewer::CardViewer(Window* parent, int id, long style) CardViewer::CardViewer(Window* parent, int id, long style)
: wxPanel(parent, id, wxDefaultPosition, wxDefaultSize, style & wxNO_BORDER ? style : style | wxSUNKEN_BORDER) : wxControl(parent, id, wxDefaultPosition, wxDefaultSize, style)
, up_to_date(false) , up_to_date(false)
{} {}
......
...@@ -22,7 +22,7 @@ DECLARE_EVENT_TYPE(EVENT_SIZE_CHANGE, <not used>) ...@@ -22,7 +22,7 @@ DECLARE_EVENT_TYPE(EVENT_SIZE_CHANGE, <not used>)
// ----------------------------------------------------------------------------- : CardViewer // ----------------------------------------------------------------------------- : CardViewer
/// A control to view a single card /// A control to view a single card
class CardViewer : public wxPanel, public DataViewer { class CardViewer : public wxControl, public DataViewer {
public: public:
CardViewer(Window* parent, int id, long style = 0); CardViewer(Window* parent, int id, long style = 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment