diff options
author | Matt Mower <mowerm@gmail.com> | 2015-04-09 23:04:12 +0200 |
---|---|---|
committer | Dees Troy <dees_troy@teamw.in> | 2015-05-18 18:51:49 +0200 |
commit | d411f8da8e10534ca5bd9de4fd1458788723b0da (patch) | |
tree | e872f41348b7af093de8e636e051d3de6d6303a0 /gui | |
parent | TZ: Update default time zone string (diff) | |
download | android_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')
-rw-r--r-- | gui/pages.cpp | 11 |
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("", ""); |