Remove duplicated calls

setPosition will call setGeometry internally, no need to do both.
Only call setEnabledBorder once, with the enabled borders
This commit is contained in:
Aleix Pol 2014-01-08 17:37:57 +01:00
parent e7e2eeddc0
commit 9e46c82733

View File

@ -134,7 +134,6 @@ void DialogProxy::onVisibleChanged()
if (geometry() != screen()->availableGeometry()) {
m_cachedGeometry = geometry();
}
setPosition(screen()->availableGeometry().topLeft());
setGeometry(screen()->availableGeometry());
} else {
if (!m_cachedGeometry.isNull()) {
@ -403,8 +402,6 @@ void DialogProxy::syncBorders()
{
const QRect avail = screen()->availableGeometry();
m_frameSvgItem->setEnabledBorders(Plasma::FrameSvg::AllBorders);
int borders = Plasma::FrameSvg::AllBorders;
if (x() <= avail.x() || m_location == Plasma::Types::LeftEdge) {
borders = borders & ~Plasma::FrameSvg::LeftBorder;