Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gauthier Quesnel
irritator
Commits
94185991
Commit
94185991
authored
Sep 01, 2020
by
Gauthier Quesnel
Browse files
gui: move editor context after grid/automatic layout
parent
8003eff9
Pipeline
#16951
passed with stage
in 1 minute and 32 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
app/gui/node-editor.cpp
View file @
94185991
...
...
@@ -786,6 +786,10 @@ void
editor
::
compute_grid_layout
()
noexcept
{
const
auto
size
=
length
(
top
.
children
);
if
(
size
==
0
)
return
;
const
auto
tmp
=
std
::
sqrt
(
size
);
const
auto
column
=
static_cast
<
int
>
(
tmp
);
auto
line
=
column
;
...
...
@@ -822,6 +826,8 @@ editor::compute_grid_layout() noexcept
positions
[
elem
].
y
=
new_pos
.
y
;
++
elem
;
}
imnodes
::
EditorContextMoveToNode
(
top
.
children
[
size
/
2
].
second
);
}
void
...
...
@@ -926,6 +932,8 @@ editor::compute_automatic_layout() noexcept
imnodes
::
SetNodeGridSpacePos
(
top
.
children
[
v
].
second
,
positions
[
v
]);
}
}
imnodes
::
EditorContextMoveToNode
(
top
.
children
[
size
/
2
].
second
);
}
status
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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