Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use ExpandArea() instead of custom and flawed code to achieve the sam…

…e in MythUIStateType. Potentially fixes a few drawing bugs.

(cherry picked from commit b25ec2e)
  • Loading branch information...
commit 61ba0b78c76815cba7819013c67a3609808e8693 1 parent 4a113b0
Stuart Morgan stuartm authored
Showing with 3 additions and 13 deletions.
  1. +3 −13 mythtv/libs/libmythui/mythuistatetype.cpp
16 mythtv/libs/libmythui/mythuistatetype.cpp
View
@@ -51,12 +51,7 @@ bool MythUIStateType::AddObject(const QString &name, MythUIType *object)
else
objectArea.CalculateArea(GetMythMainWindow()->GetUIScreenRect());
- if (objectArea.width() > m_Area.width() ||
- objectArea.height() > m_Area.height())
- {
- m_Area.setWidth(objectArea.getWidth());
- m_Area.setHeight(objectArea.getHeight());
- }
+ ExpandArea(objectArea);
return true;
}
@@ -88,12 +83,7 @@ bool MythUIStateType::AddObject(StateType type, MythUIType *object)
else
objectArea.CalculateArea(GetMythMainWindow()->GetUIScreenRect());
- if (objectArea.width() > m_Area.width() ||
- objectArea.height() > m_Area.height())
- {
- m_Area.setWidth(objectArea.getWidth());
- m_Area.setHeight(objectArea.getHeight());
- }
+ ExpandArea(objectArea);
return true;
}
@@ -104,7 +94,7 @@ bool MythUIStateType::DisplayState(const QString &name)
return false;
MythUIType *old = m_CurrentState;
-
+
QMap<QString, MythUIType *>::Iterator i = m_ObjectsByName.find(name.toLower());
if (i != m_ObjectsByName.end())
m_CurrentState = i.value();
Please sign in to comment.
Something went wrong with that request. Please try again.