diff options
author | Ethan Yonker <dees_troy@teamw.in> | 2015-02-14 17:39:21 +0100 |
---|---|---|
committer | Ethan Yonker <dees_troy@teamw.in> | 2015-02-15 00:27:46 +0100 |
commit | cfd650902785e55a6787038aa0b405dfeb8f9f80 (patch) | |
tree | e341a7d5110b1f6ce07c95960c22903d26976ce1 /gui | |
parent | gui: fix condition handling for lists (diff) | |
download | android_bootable_recovery-cfd650902785e55a6787038aa0b405dfeb8f9f80.tar android_bootable_recovery-cfd650902785e55a6787038aa0b405dfeb8f9f80.tar.gz android_bootable_recovery-cfd650902785e55a6787038aa0b405dfeb8f9f80.tar.bz2 android_bootable_recovery-cfd650902785e55a6787038aa0b405dfeb8f9f80.tar.lz android_bootable_recovery-cfd650902785e55a6787038aa0b405dfeb8f9f80.tar.xz android_bootable_recovery-cfd650902785e55a6787038aa0b405dfeb8f9f80.tar.zst android_bootable_recovery-cfd650902785e55a6787038aa0b405dfeb8f9f80.zip |
Diffstat (limited to '')
-rw-r--r-- | gui/objects.hpp | 2 | ||||
-rw-r--r-- | gui/partitionlist.cpp | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/gui/objects.hpp b/gui/objects.hpp index c286567f9..5eae919d7 100644 --- a/gui/objects.hpp +++ b/gui/objects.hpp @@ -728,7 +728,7 @@ public: protected: void MatchList(); - void SetStoragePosition(); + void SetPosition(); protected: std::vector<PartitionList> mList; diff --git a/gui/partitionlist.cpp b/gui/partitionlist.cpp index e9c16524a..97f6e4ec5 100644 --- a/gui/partitionlist.cpp +++ b/gui/partitionlist.cpp @@ -130,7 +130,7 @@ int GUIPartitionList::Update(void) SetVisibleListLocation(0); updateList = false; mUpdate = 1; - if (ListType == "backup") + if (ListType == "backup" || ListType == "flashimg") MatchList(); } @@ -154,7 +154,7 @@ int GUIPartitionList::NotifyVarChange(const std::string& varName, const std::str { if (ListType == "storage") { currentValue = value; - SetStoragePosition(); + SetPosition(); } else if (ListType == "backup") { MatchList(); } else if (ListType == "restore") { @@ -172,9 +172,9 @@ void GUIPartitionList::SetPageFocus(int inFocus) { GUIScrollList::SetPageFocus(inFocus); if (inFocus) { - if (ListType == "storage") { + if (ListType == "storage" || ListType == "flashimg") { DataManager::GetValue(mVariable, currentValue); - SetStoragePosition(); + SetPosition(); } updateList = true; mUpdate = 1; @@ -199,16 +199,16 @@ void GUIPartitionList::MatchList(void) { } } -void GUIPartitionList::SetStoragePosition() { +void GUIPartitionList::SetPosition() { int listSize = mList.size(); + SetVisibleListLocation(0); for (int i = 0; i < listSize; i++) { if (mList.at(i).Mount_Point == currentValue) { mList.at(i).selected = 1; SetVisibleListLocation(i); } else { mList.at(i).selected = 0; - SetVisibleListLocation(0); } } } |