summaryrefslogtreecommitdiffstats
path: root/gui/pages.cpp
diff options
context:
space:
mode:
authorMatt Mower <mowerm@gmail.com>2015-04-09 23:04:12 +0200
committerDees Troy <dees_troy@teamw.in>2015-05-18 18:51:49 +0200
commitd411f8da8e10534ca5bd9de4fd1458788723b0da (patch)
treee872f41348b7af093de8e636e051d3de6d6303a0 /gui/pages.cpp
parentTZ: Update default time zone string (diff)
downloadandroid_bootable_recovery-d411f8da8e10534ca5bd9de4fd1458788723b0da.tar
android_bootable_recovery-d411f8da8e10534ca5bd9de4fd1458788723b0da.tar.gz
android_bootable_recovery-d411f8da8e10534ca5bd9de4fd1458788723b0da.tar.bz2
android_bootable_recovery-d411f8da8e10534ca5bd9de4fd1458788723b0da.tar.lz
android_bootable_recovery-d411f8da8e10534ca5bd9de4fd1458788723b0da.tar.xz
android_bootable_recovery-d411f8da8e10534ca5bd9de4fd1458788723b0da.tar.zst
android_bootable_recovery-d411f8da8e10534ca5bd9de4fd1458788723b0da.zip
Diffstat (limited to 'gui/pages.cpp')
-rw-r--r--gui/pages.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/gui/pages.cpp b/gui/pages.cpp
index 7107c924c..975d40ff0 100644
--- a/gui/pages.cpp
+++ b/gui/pages.cpp
@@ -936,6 +936,17 @@ int PageSet::SetOverlay(Page* page)
LOGERR("Too many overlays requested, max is 10.\n");
return -1;
}
+
+ std::vector<Page*>::iterator iter;
+ for (iter = mOverlays.begin(); iter != mOverlays.end(); iter++) {
+ if ((*iter)->GetName() == page->GetName()) {
+ mOverlays.erase(iter);
+ // SetOverlay() is (and should stay) the only function which
+ // adds to mOverlays. Then, each page can appear at most once.
+ break;
+ }
+ }
+
page->SetPageFocus(1);
page->NotifyVarChange("", "");