diff options
Diffstat (limited to 'gui/partitionlist.cpp')
-rw-r--r-- | gui/partitionlist.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gui/partitionlist.cpp b/gui/partitionlist.cpp index 35bf702bb..cb9011f30 100644 --- a/gui/partitionlist.cpp +++ b/gui/partitionlist.cpp @@ -52,7 +52,7 @@ extern "C" { #define SCROLLING_FLOOR 10 #define SCROLLING_MULTIPLIER 6 -GUIPartitionList::GUIPartitionList(xml_node<>* node) +GUIPartitionList::GUIPartitionList(xml_node<>* node) : GUIObject(node) { xml_attribute<>* attr; xml_node<>* child; @@ -344,6 +344,9 @@ GUIPartitionList::~GUIPartitionList() int GUIPartitionList::Render(void) { + if(!isConditionTrue()) + return 0; + // First step, fill background gr_color(mBackgroundColor.red, mBackgroundColor.green, mBackgroundColor.blue, 255); gr_fill(mRenderX, mRenderY + mHeaderH, mRenderW, mRenderH - mHeaderH); @@ -525,6 +528,9 @@ int GUIPartitionList::Render(void) int GUIPartitionList::Update(void) { + if(!isConditionTrue()) + return 0; + if (!mHeaderIsStatic) { std::string newValue = gui_parse_text(mHeaderText); if (mLastValue != newValue) { @@ -619,6 +625,9 @@ int GUIPartitionList::GetSelection(int x, int y) int GUIPartitionList::NotifyTouch(TOUCH_STATE state, int x, int y) { + if(!isConditionTrue()) + return -1; + static int lastY = 0, last2Y = 0; int selection = 0; @@ -820,6 +829,9 @@ int GUIPartitionList::NotifyTouch(TOUCH_STATE state, int x, int y) int GUIPartitionList::NotifyVarChange(std::string varName, std::string value) { + if(!isConditionTrue()) + return 0; + if (!mHeaderIsStatic) { std::string newValue = gui_parse_text(mHeaderText); if (mLastValue != newValue) { |