Commit 0f581799 authored by Marco Bubke's avatar Marco Bubke

QmlDesigner: Rename scenePos in scenePosition

And change it to QPointF.

Change-Id: I24c6238eb2c415296b4621b7aa0ec06d85293cb7
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent e06f7e1d
......@@ -42,7 +42,7 @@ static inline QString captionForModelNode(const ModelNode &modelNode)
return modelNode.id();
}
static inline bool contains(const QmlItemNode &node, const QPoint &position)
static inline bool contains(const QmlItemNode &node, const QPointF &position)
{
return node.isValid() && node.instanceSceneTransform().mapRect(node.instanceBoundingRect()).contains(position);
}
......@@ -346,7 +346,7 @@ public:
foreach (const ModelNode &node, m_selectionContext.view()->allModelNodes()) {
if (node != m_selectionContext.currentSingleSelectedNode()
&& node != parentNode
&& contains(node, m_selectionContext.scenePos())
&& contains(node, m_selectionContext.scenePosition())
&& !node.isRootNode()) {
m_selectionContext.setTargetNode(node);
QString what = QString(QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Select: %1")).arg(captionForModelNode(node));
......
......@@ -94,7 +94,7 @@ void ModelNodeContextMenu::execute(const QPoint &position, bool selectionMenuBoo
QMenu* mainMenu = new QMenu();
m_selectionContext.setShowSelectionTools(selectionMenuBool);
m_selectionContext.setScenePos(m_scenePos);
m_selectionContext.setScenePosition(m_scenePos);
QSet<AbstractDesignerAction* > factories =
......
......@@ -101,12 +101,12 @@ bool SelectionContext::showSelectionTools() const
return m_showSelectionTools;
}
void SelectionContext::setScenePos(const QPoint &postition)
void SelectionContext::setScenePosition(const QPointF &postition)
{
m_scenePosition = postition;
}
QPoint SelectionContext::scenePos() const
QPointF SelectionContext::scenePosition() const
{
return m_scenePosition;
}
......
......@@ -29,7 +29,7 @@
#include <qmldesignercorelib_global.h>
#include <abstractview.h>
#include <QPoint>
#include <QPointF>
#ifndef SELECTIONCONTEXT_H
#define SELECTIONCONTEXT_H
......@@ -58,8 +58,8 @@ public:
void setShowSelectionTools(bool show);
bool showSelectionTools() const;
void setScenePos(const QPoint &postition);
QPoint scenePos() const;
void setScenePosition(const QPointF &postition);
QPointF scenePosition() const;
void setToggled(bool toggled);
bool toggled() const;
......@@ -70,7 +70,7 @@ private:
QWeakPointer<AbstractView> m_view;
ModelNode m_targetNode;
bool m_showSelectionTools;
QPoint m_scenePosition;
QPointF m_scenePosition;
bool m_toggled;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment