From c79bf94c53a9e34f50b8a37c8799ebab9bf8f29b Mon Sep 17 00:00:00 2001 From: Thomas Hartmann <Thomas.Hartmann@nokia.com> Date: Fri, 9 Jul 2010 15:56:43 +0200 Subject: [PATCH] QmlDesigner.contextPane: do not remeber position --- .../components/propertyeditor/contextpanewidget.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidget.cpp b/src/plugins/qmldesigner/components/propertyeditor/contextpanewidget.cpp index 578278e99a4..1b198005ae9 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/contextpanewidget.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/contextpanewidget.cpp @@ -65,7 +65,7 @@ ContextPaneWidget::~ContextPaneWidget() m_bauhausColorDialog.clear(); } -void ContextPaneWidget::activate(const QPoint &pos, const QPoint &alternative) +void ContextPaneWidget::activate(const QPoint &pos, const QPoint &alternative, const QPoint &alternative2) { //uncheck all color buttons foreach (ColorButton *colorButton, findChildren<ColorButton*>()) { @@ -73,20 +73,19 @@ void ContextPaneWidget::activate(const QPoint &pos, const QPoint &alternative) } resize(sizeHint()); show(); - rePosition(pos, alternative); + rePosition(pos, alternative, alternative2); raise(); } -void ContextPaneWidget::rePosition(const QPoint &position, const QPoint &alternative) +void ContextPaneWidget::rePosition(const QPoint &position, const QPoint &alternative, const QPoint &alternative2) { - if (position.y() > 0) + if ((position.x() + width()) < parentWidget()->width()) move(position); else move(alternative); - m_originalPos = pos(); - if (m_xPos > 0) - move(m_xPos, pos().y()); + if (pos().y() < 0) + move(alternative2); } void ContextPaneWidget::deactivate() -- GitLab