peer update

git-svn-id: svn://db.shs.com.ru/pip@28 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2015-03-16 14:49:23 +00:00
parent e50bedc5ef
commit 6498313fdd
6 changed files with 79 additions and 33 deletions

View File

@@ -356,9 +356,9 @@ void PIScreen::key_event(PIKbdListener::KeyEvent key) {
bool PIScreen::nextFocus(PIScreenTile * rt, PIKbdListener::KeyEvent key) {
PIVector<PIScreenTile*> tl = rt->children(), ftl;
piForeach (PIScreenTile * t, tl) {
if (t->focus_flags[CanHasFocus] && t->visible)
PIVector<PIScreenTile*> vtl = rt->children(true), ftl;
piForeach (PIScreenTile * t, vtl) {
if (t->focus_flags[CanHasFocus])
ftl << t;
}
int ind = -1;
@@ -385,14 +385,17 @@ bool PIScreen::nextFocus(PIScreenTile * rt, PIKbdListener::KeyEvent key) {
}
}
//piCout << ftl.size() << ind << next;
if (next != 0 && !ftl.isEmpty()) {
if (next != 0) {
PIVector<PIScreenTile*> tl = rt->children();
piForeach (PIScreenTile * t, tl)
t->has_focus = false;
ind += next;
if (ind >= ftl.size_s()) ind = 0;
if (ind < 0) ind = ftl.size_s() - 1;
tile_focus = ftl[ind];
tile_focus->has_focus = true;
if (!ftl.isEmpty()) {
ind += next;
if (ind >= ftl.size_s()) ind = 0;
if (ind < 0) ind = ftl.size_s() - 1;
tile_focus = ftl[ind];
tile_focus->has_focus = true;
}
return true;
}
}