mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Some more keyboard related tweaks.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@661 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -18,7 +18,6 @@ DECLARE_TYPEOF_COLLECTION(ValueViewerP);
|
||||
|
||||
TextCtrl::TextCtrl(Window* parent, int id, bool multi_line, long style)
|
||||
: DataEditor(parent, id, style)
|
||||
, value(nullptr)
|
||||
, multi_line(multi_line)
|
||||
{}
|
||||
TextCtrl::~TextCtrl() {}
|
||||
@@ -36,6 +35,12 @@ void TextCtrl::draw(DC& dc) {
|
||||
}
|
||||
}
|
||||
|
||||
bool TextCtrl::AcceptsFocus() const {
|
||||
return wxControl::AcceptsFocus() &&
|
||||
!viewers.empty() &&
|
||||
static_cast<FakeTextValue&>(*viewers.front()->getValue()).editable;
|
||||
}
|
||||
|
||||
|
||||
TextStyle& TextCtrl::getStyle() {
|
||||
assert(!viewers.empty());
|
||||
|
||||
Reference in New Issue
Block a user