Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
SpaceCreator
Commits
ba409190
Commit
ba409190
authored
Sep 14, 2021
by
Alex Diev
Committed by
Guenter Schwann
Sep 14, 2021
Browse files
IVE: Undo actions performed after entering/leaving nested view mess up the scene
parent
44ccf3b6
Pipeline
#5732
passed with stage
in 14 minutes and 13 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/libs/libiveditor/interfacedocument.cpp
View file @
ba409190
...
...
@@ -655,7 +655,7 @@ void InterfaceDocument::onItemDoubleClicked(const shared::Id &id)
if
(
entity
->
isFunction
())
{
if
(
auto
fn
=
entity
->
as
<
ivm
::
IVFunction
*>
())
{
if
(
fn
->
hasNestedChildren
())
{
d
->
object
sModel
->
setRootObject
(
id
);
d
->
item
sModel
->
changeRootItem
(
id
);
return
;
}
}
...
...
src/libs/libiveditor/itemeditor/ivfunctiongraphicsitem.cpp
View file @
ba409190
...
...
@@ -58,6 +58,15 @@ IVFunctionGraphicsItem::IVFunctionGraphicsItem(ivm::IVFunction *entity, QGraphic
IVFunctionGraphicsItem
::~
IVFunctionGraphicsItem
()
{
}
void
IVFunctionGraphicsItem
::
init
()
{
IVFunctionTypeGraphicsItem
::
init
();
if
(
auto
dataObj
=
entity
())
{
connect
(
dataObj
,
&
ivm
::
IVFunction
::
childAdded
,
this
,
[
this
](){
update
();
});
connect
(
dataObj
,
&
ivm
::
IVFunction
::
childRemoved
,
this
,
[
this
](){
update
();
});
}
}
ivm
::
IVFunction
*
IVFunctionGraphicsItem
::
entity
()
const
{
return
qobject_cast
<
ivm
::
IVFunction
*>
(
m_dataObject
);
...
...
src/libs/libiveditor/itemeditor/ivfunctiongraphicsitem.h
View file @
ba409190
...
...
@@ -45,6 +45,8 @@ public:
Type
=
UserType
+
static_cast
<
int
>
(
ivm
::
IVObject
::
Type
::
Function
)
};
void
init
()
override
;
ivm
::
IVFunction
*
entity
()
const
override
;
int
type
()
const
override
{
return
Type
;
}
...
...
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