Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Maintenance - Mise à jour mensuelle Lundi 6 Février entre 7h00 et 9h00
Open sidebar
Gauthier Quesnel
irritator
Commits
40bf2a9e
Commit
40bf2a9e
authored
Apr 20, 2020
by
Gauthier Quesnel
Browse files
gui: enable some log
parent
8b57e7d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/gui/gui.hpp
View file @
40bf2a9e
...
...
@@ -26,7 +26,7 @@ struct window_logger
bool
auto_scroll
=
true
;
bool
scroll_to_bottom
=
false
;
window_logger
()
=
default
;
void
clear
()
noexcept
;
void
log
(
const
int
level
,
const
char
*
fmt
,
...)
IM_FMTARGS
(
3
);
...
...
app/gui/node-editor.cpp
View file @
40bf2a9e
...
...
@@ -88,15 +88,16 @@ run_simulation(simulation& sim,
const
bool
&
stop
)
noexcept
{
current
=
begin
;
if
(
irt
::
is_bad
(
sim
.
initialize
(
current
)))
{
log_w
.
log
(
3
,
"Simulation initialization failure"
);
if
(
auto
ret
=
sim
.
initialize
(
current
);
irt
::
is_bad
(
ret
))
{
log_w
.
log
(
3
,
"Simulation initialization failure (%d)"
,
static_cast
<
int
>
(
ret
));
st
=
simulation_status
::
internal_error
;
return
;
}
do
{
if
(
!
is_success
(
sim
.
run
(
current
)))
{
log_w
.
log
(
3
,
"Simulation run failure
"
);
if
(
auto
ret
=
sim
.
run
(
current
)
;
irt
::
is_bad
(
ret
))
{
log_w
.
log
(
3
,
"Simulation run failure
(%d)"
,
static_cast
<
int
>
(
ret
)
);
st
=
simulation_status
::
internal_error
;
return
;
}
...
...
@@ -913,6 +914,8 @@ show_editor(const char* editor_name, editor& ed)
int
link_id_to_delete
=
selected_links
[
0
];
int
current_link_id
=
0
;
log_w
.
log
(
7
,
"%d connections to delete
\n
"
,
num_selected
);
output_port
*
o_port
=
nullptr
;
while
(
ed
.
sim
.
output_ports
.
next
(
o_port
)
&&
link_id_to_delete
!=
-
1
)
{
...
...
@@ -1055,8 +1058,9 @@ editor ed;
void
node_editor_initialize
()
{
if
(
!
ed
.
initialize
())
{
log_w
.
log
(
3
,
"Fail to initialize node editor
\n
"
);
if
(
auto
ret
=
ed
.
initialize
();
is_bad
(
ret
))
{
log_w
.
log
(
3
,
"Fail to initialize node editor: %d
\n
"
,
static_cast
<
int
>
(
ret
));
return
;
}
...
...
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