Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Skyward Enhanced Ground Software
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Avionics
Software Development
Skyward Enhanced Ground Software
Commits
1f0ca358
Commit
1f0ca358
authored
4 months ago
by
Federico Lolli
Browse files
Options
Downloads
Patches
Plain Diff
[plot] moved window creation at the end of the loop
parent
12558c28
No related branches found
No related tags found
1 merge request
!13
Refactored Mavlink Communication for Improved Reliability
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ui/panes/plot.rs
+13
-13
13 additions, 13 deletions
src/ui/panes/plot.rs
with
13 additions
and
13 deletions
src/ui/panes/plot.rs
+
13
−
13
View file @
1f0ca358
...
@@ -42,19 +42,6 @@ impl PaneBehavior for Plot2DPane {
...
@@ -42,19 +42,6 @@ impl PaneBehavior for Plot2DPane {
fn
ui
(
&
mut
self
,
ui
:
&
mut
egui
::
Ui
,
_
:
TileId
)
->
PaneResponse
{
fn
ui
(
&
mut
self
,
ui
:
&
mut
egui
::
Ui
,
_
:
TileId
)
->
PaneResponse
{
let
mut
response
=
PaneResponse
::
default
();
let
mut
response
=
PaneResponse
::
default
();
let
mut
settings
=
SourceSettings
::
new
(
&
mut
self
.settings
,
&
mut
self
.line_settings
);
egui
::
Window
::
new
(
"Plot Settings"
)
.id
(
ui
.auto_id_with
(
"plot_settings"
))
// TODO: fix this issue with ids
.auto_sized
()
.collapsible
(
true
)
.movable
(
true
)
.open
(
&
mut
self
.settings_visible
)
.show
(
ui
.ctx
(),
|
ui
|
sources_window
(
ui
,
&
mut
settings
));
if
settings
.are_sources_changed
()
{
self
.state_valid
=
false
;
}
let
ctrl_pressed
=
ui
.input
(|
i
|
i
.modifiers.ctrl
);
let
ctrl_pressed
=
ui
.input
(|
i
|
i
.modifiers.ctrl
);
egui_plot
::
Plot
::
new
(
"plot"
)
egui_plot
::
Plot
::
new
(
"plot"
)
...
@@ -81,6 +68,19 @@ impl PaneBehavior for Plot2DPane {
...
@@ -81,6 +68,19 @@ impl PaneBehavior for Plot2DPane {
.context_menu
(|
ui
|
show_menu
(
ui
,
&
mut
self
.settings_visible
));
.context_menu
(|
ui
|
show_menu
(
ui
,
&
mut
self
.settings_visible
));
});
});
let
mut
settings
=
SourceSettings
::
new
(
&
mut
self
.settings
,
&
mut
self
.line_settings
);
egui
::
Window
::
new
(
"Plot Settings"
)
.id
(
ui
.auto_id_with
(
"plot_settings"
))
// TODO: fix this issue with ids
.auto_sized
()
.collapsible
(
true
)
.movable
(
true
)
.open
(
&
mut
self
.settings_visible
)
.show
(
ui
.ctx
(),
|
ui
|
sources_window
(
ui
,
&
mut
settings
));
if
settings
.are_sources_changed
()
{
self
.state_valid
=
false
;
}
response
response
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment