diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-30 16:06:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-30 16:59:12 +0300 |
commit | 60d90692e487948b77edcac63acbef34254cea5b (patch) | |
tree | c2ca72f720f835099bc65c2832d5c7df3d92abbd /src/gui/widgets/dropdown.cpp | |
parent | 38fe5f43b5ac41e41debed4868e81b4b4bf839ac (diff) | |
download | manaverse-60d90692e487948b77edcac63acbef34254cea5b.tar.gz manaverse-60d90692e487948b77edcac63acbef34254cea5b.tar.bz2 manaverse-60d90692e487948b77edcac63acbef34254cea5b.tar.xz manaverse-60d90692e487948b77edcac63acbef34254cea5b.zip |
remove duplicate variables.
Diffstat (limited to 'src/gui/widgets/dropdown.cpp')
-rw-r--r-- | src/gui/widgets/dropdown.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp index 0b67958df..9845c295c 100644 --- a/src/gui/widgets/dropdown.cpp +++ b/src/gui/widgets/dropdown.cpp @@ -76,7 +76,6 @@ DropDown::DropDown(const Widget2 *const widget, mPadding(1), mImagePadding(2), mSpacing(0), - mForegroundColor2(getThemeColor(Theme::DROPDOWN_OUTLINE)), mFoldedUpHeight(0), mSelectionListeners(), mExtended(extended), @@ -85,6 +84,7 @@ DropDown::DropDown(const Widget2 *const widget, mIsDragged(false) { mFrameSize = 2; + mForegroundColor2 = getThemeColor(Theme::DROPDOWN_OUTLINE); mPopup->setHeight(100); @@ -455,6 +455,8 @@ void DropDown::dropDown() { if (!mDroppedDown) { + if (!mParent) + return; mDroppedDown = true; mFoldedUpHeight = getHeight(); adjustHeight(); @@ -462,7 +464,7 @@ void DropDown::dropDown() int x = 0; int y = 0; getAbsolutePosition(x, y); - const int frame = getParent()->getFrameSize(); + const int frame = mParent->getFrameSize(); const int pad = mPopup->getPadding(); const int pad2 = pad * 2; |