Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
beb6f59c
Commit
beb6f59c
authored
Jul 30, 2010
by
Lasse Holmstedt
Browse files
Fix to avoid selection loop b/w QML Inspector and QML Observer
parent
912487d3
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/libs/qmljsdebugger/include/qdeclarativedesignview.h
View file @
beb6f59c
...
...
@@ -95,6 +95,7 @@ protected:
void
mouseDoubleClickEvent
(
QMouseEvent
*
event
);
void
wheelEvent
(
QWheelEvent
*
event
);
void
setSelectedItemsForTools
(
QList
<
QGraphicsItem
*>
items
);
private:
Q_DISABLE_COPY
(
QDeclarativeDesignView
)
Q_PRIVATE_SLOT
(
d_func
(),
void
_q_reloadView
())
...
...
src/libs/qmljsdebugger/qdeclarativedesignview.cpp
View file @
beb6f59c
...
...
@@ -334,9 +334,6 @@ bool QDeclarativeDesignView::designModeBehavior()
return
data
->
designModeBehavior
;
}
void
QDeclarativeDesignViewPrivate
::
changeTool
(
Constants
::
DesignTool
tool
,
Constants
::
ToolFlags
/*flags*/
)
{
switch
(
tool
)
{
...
...
@@ -350,7 +347,7 @@ void QDeclarativeDesignViewPrivate::changeTool(Constants::DesignTool tool, Const
}
}
void
QDeclarativeDesignViewPrivate
::
setSelectedItems
(
QList
<
QGraphicsItem
*>
items
)
void
QDeclarativeDesignViewPrivate
::
setSelectedItems
ForTools
(
QList
<
QGraphicsItem
*>
items
)
{
currentSelection
.
clear
();
foreach
(
QGraphicsItem
*
item
,
items
)
{
...
...
@@ -361,6 +358,11 @@ void QDeclarativeDesignViewPrivate::setSelectedItems(QList<QGraphicsItem *> item
}
}
currentTool
->
updateSelectedItems
();
}
void
QDeclarativeDesignViewPrivate
::
setSelectedItems
(
QList
<
QGraphicsItem
*>
items
)
{
setSelectedItemsForTools
(
items
);
qmlDesignDebugServer
()
->
setCurrentObjects
(
AbstractFormEditorTool
::
toObjectList
(
items
));
}
...
...
@@ -591,8 +593,8 @@ void QDeclarativeDesignViewPrivate::_q_onStatusChanged(QDeclarativeView::Status
{
if
(
status
==
QDeclarativeView
::
Ready
)
{
if
(
q
->
rootObject
())
{
if
(
data
->
subcomponentEditorTool
->
contextIndex
()
!=
-
1
)
data
->
subcomponentEditorTool
->
clear
();
if
(
subcomponentEditorTool
->
contextIndex
()
!=
-
1
)
subcomponentEditorTool
->
clear
();
subcomponentEditorTool
->
pushContext
(
q
->
rootObject
());
emit
q
->
executionStarted
(
1.0
f
);
...
...
@@ -610,7 +612,7 @@ void QDeclarativeDesignViewPrivate::_q_onCurrentObjectsChanged(QList<QObject*> o
items
<<
declarativeItem
;
}
setSelectedItems
(
items
);
setSelectedItems
ForTools
(
items
);
clearHighlight
();
highlight
(
items
,
QDeclarativeDesignViewPrivate
::
IgnoreContext
);
}
...
...
src/libs/qmljsdebugger/qdeclarativedesignview_p.h
View file @
beb6f59c
...
...
@@ -93,6 +93,8 @@ public:
QList
<
QGraphicsItem
*>
selectableItems
(
const
QPointF
&
scenePos
)
const
;
QList
<
QGraphicsItem
*>
selectableItems
(
const
QRectF
&
sceneRect
,
Qt
::
ItemSelectionMode
selectionMode
)
const
;
void
setSelectedItemsForTools
(
QList
<
QGraphicsItem
*>
items
);
void
setSelectedItems
(
QList
<
QGraphicsItem
*>
items
);
QList
<
QGraphicsItem
*>
selectedItems
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment