aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/TextButton.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/TextButton.cc')
-rw-r--r--src/FbTk/TextButton.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/FbTk/TextButton.cc b/src/FbTk/TextButton.cc
index 0d9eef0..474c094 100644
--- a/src/FbTk/TextButton.cc
+++ b/src/FbTk/TextButton.cc
@@ -63,8 +63,10 @@ void TextButton::setJustify(FbTk::Justify just) {
63} 63}
64 64
65bool TextButton::setOrientation(FbTk::Orientation orient) { 65bool TextButton::setOrientation(FbTk::Orientation orient) {
66 if (!m_font->validOrientation(orient)) 66 if (orient == m_orientation
67 || !m_font->validOrientation(orient))
67 return false; 68 return false;
69 invalidateBackground();
68 70
69 if ((m_orientation == FbTk::ROT0 || m_orientation == FbTk::ROT180) && 71 if ((m_orientation == FbTk::ROT0 || m_orientation == FbTk::ROT180) &&
70 (orient == FbTk::ROT90 || orient == FbTk::ROT270) || 72 (orient == FbTk::ROT90 || orient == FbTk::ROT270) ||
@@ -76,8 +78,7 @@ bool TextButton::setOrientation(FbTk::Orientation orient) {
76 } else { 78 } else {
77 m_orientation = orient; 79 m_orientation = orient;
78 } 80 }
79 updateBackground(false); 81
80 clear();
81 return true; 82 return true;
82} 83}
83 84