mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Improvements to keyboard handling (TAB)
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@660 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -798,7 +798,7 @@ void GraphContainer::add(const GraphP& graph) {
|
||||
// ----------------------------------------------------------------------------- : GraphControl
|
||||
|
||||
GraphControl::GraphControl(Window* parent, int id)
|
||||
: wxControl(parent, id)
|
||||
: wxControl(parent, id, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS)
|
||||
{}
|
||||
|
||||
void GraphControl::setLayout(GraphType type) {
|
||||
@@ -912,6 +912,13 @@ void GraphControl::onChar(wxKeyEvent& ev) {
|
||||
onSelectionChange();
|
||||
}
|
||||
break;
|
||||
case WXK_TAB: {
|
||||
// send a navigation event to our parent, to select another control
|
||||
// we need this because of wxWANTS_CHARS
|
||||
wxNavigationKeyEvent nev;
|
||||
nev.SetDirection(!ev.ShiftDown());
|
||||
GetParent()->ProcessEvent(nev);
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user