Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated_multiple_flightpath_dockwidget #1544

Conversation

Jatin2020-24
Copy link
Contributor

listviews

@ReimarBauer
Copy link
Member

fine, the one which is activated (highlighted bold) should have a check. So that activation means check it too. And the state of this should only be changeable by activating another one on the msui main window.

@ReimarBauer
Copy link
Member

ReimarBauer commented Sep 4, 2022

you need to update names, when one saves

name_update

a new topview has updated names

@ReimarBauer
Copy link
Member

When I have many in the view and I toggle the one which I can edit, the other previous seen should toggle to a line (visible). Currently I would have to reactivate them again.

previous_should_be_shown_too

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Jatin2020-24 this already looks good
see comments.

@ReimarBauer
Copy link
Member

When we use the color changer from options it somehow toggles color with the other
color

@ReimarBauer
Copy link
Member

ReimarBauer commented Sep 4, 2022

we can switch between docking widgets. The selection what is shown should only been controlledf by the multiple Flightpath widget. so e.g. adding data by the layer chooser needs to take this in account too. (all other docking widgets too)

using_layerchooser

from mslib.msui import msui
import xml
import threading
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ReimarBauer
Copy link
Member

The previous visible selected flightpath for editing has no mark in [a]. This should switch to marked, So that it is on, when one selects [b] for editing. A user has to unselect [a] to get it removed from multiple flightpath docking widget.
The image shows now [a] and [b] unmarked.

If I would select [c] for editing and then [d] all are unmarked.

toggle

@ReimarBauer
Copy link
Member

ReimarBauer commented Oct 16, 2022

When I remove a not saved flight path it gives a traceback, it is then removed in the flightpath list, not yet in the docking widget.
remove_problem

Fatal error in MSS 7.0.1. on Linux-5.4.0-128-generic-x86_64-with-glibc2.27
Python 3.10.4 | packaged by conda-forge | (main, Mar 24 2022, 17:38:57) [GCC 10.3.0]

Please report bugs in MSS to https://github.com/Open-MSS/MSS

Information about the fatal error:

Traceback (most recent call last):
  File "/home/reimar/PycharmProjects/2021/Jatin2020-24/MSS/mslib/msui/multiple_flightpath_dockwidget.py", line 231, in flighttrackRemoved
    self.dict_files[self.list_flighttrack.item(start).flighttrack_model]["patch"].remove()
AttributeError: 'NoneType' object has no attribute 'remove'

@ReimarBauer
Copy link
Member

When I don't save local flightpathes, they are not correct shown in the docking widget

local_unsaved_flightpath

self.listView = listView
self.ui = parent
self.setupUi(self)
self.view = view # canvas
self.flight_path = None # flightpath object
self.colour = None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.color?

Just seen that we used it different written all over MSS, on other places you use self.color.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed


def wait(self, parent, start, end):
self.flighttrack_added = True
t1 = threading.Timer(0.5, self.flighttrackAdded, [parent, start, end])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is needed when signals are used, is it?

@ReimarBauer
Copy link
Member

ReimarBauer commented Oct 20, 2022

good improvement :)

I found another problem, or inconsity ;)

We currently define the flight track color in the options (you get this by the options button) This has precedence. We don't have there line thickness.

For the color we maybe can solve this by:
Use color defined in options for initial color of active flight path. afterwards deactivate the color change button in options and it needs also the check mark for enabled, but can't be changed (disabled). At the moment the dockingwidget is closed the button and checkmark has to become activated again.

options

When the precidence is given any activation of a flight track will toggle the defined color in the widget.

color

Other ideas for solving this are welcome too.

@ReimarBauer
Copy link
Member

When we activate an operation we need to be able to uncheck all multiple local flightpath. Currently the last activated is unchangeable.

mscolab

@ReimarBauer
Copy link
Member

ReimarBauer commented Oct 25, 2022

changing linewidth works, when toggling activation it falls to defaul. Linewidth is currently not so important.

I got a traceback on the activated flight track playing wiht line width and color

Traceback (most recent call last):
  File "/home/reimar/PycharmProjects/2021/Jatin2020-24/MSS/mslib/msui/multiple_flightpath_dockwidget.py", line 207, in select_color
    self.dict_flighttrack[wp_model]["patch"].update(color=
AttributeError: 'NoneType' object has no attribute 'update'
CRITICAL: MSS Version: 7.0.1.
CRITICAL: Python Version: 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:35:26) [GCC 10.4.0]
CRITICAL: Platform: Linux-5.4.0-131-generic-x86_64-with-glibc2.27 (('64bit', 'ELF'))
CRITICAL: Fatal error: Traceback (most recent call last):
  File "/home/reimar/PycharmProjects/2021/Jatin2020-24/MSS/mslib/msui/multiple_flightpath_dockwidget.py", line 207, in select_color
    self.dict_flighttrack[wp_model]["patch"].update(color=
AttributeError: 'NoneType' object has no attribute 'update'

@Jatin2020-24
Copy link
Contributor Author

Jatin2020-24 commented Oct 28, 2022

I've written most of the functions to plot operations in dockwidget. Only connections of signals and slots is remaining.

@ReimarBauer
Copy link
Member

ReimarBauer commented Oct 31, 2022

Only the activated Operation or flight track should be protected against removing the checkmark
In my example (d) as operation is activated. I can't change the state of the "new flight track (1)".

protected

@ReimarBauer
Copy link
Member

please remove the "test develop / test-filter-flight-paths" from the test configuration

@ReimarBauer
Copy link
Member

ReimarBauer commented Nov 6, 2022

mostly good :) found a little UI problem. When a user gets access to an operation but a flight track is activated we get now twice bold names in both navigations.

access_in_mscolab

When it is mscolab then it changes the activation bold formatting to the new one. E.g- (a) is activated but vvv gets bold formatting.

@ReimarBauer
Copy link
Member

activation_clear_checkmarks_on_mscolab

only the user should uncheck. Currently we can uncheck one site by selecting a flight track or a mscolab operation

@ReimarBauer
Copy link
Member

Currently I can't change thickness for mscolab lines.

@ReimarBauer
Copy link
Member

status

Seems I don't understand the text in the brackets. For me it would be enough to read the part after

@ReimarBauer
Copy link
Member

I set red in options for an activated track. Starting with (d) I activated (b) this keeps the green color, in the options it is red.
This needs to be consistent, it could be get red or have to change the options color to green and also change the activated track color to green.
Keeping it green would not give a visual change to the user but then the options color for the active flight track has to get this color.
choosing the other color now in option will get everything changed when a user toggles throught the tracks. That is why I prefer to keep it in the users color in this case green.

activated_color_update

@ReimarBauer
Copy link
Member

I slected now (d) in mscolab. I set in options blue as color. The line is also drawn in blue. the Active color is blue. The color in the widget remains green.
color_update_in_mscolab

@ReimarBauer
Copy link
Member

ReimarBauer commented Nov 7, 2022

In mscolab one can create a new operation, this is not getting default activated. Also getting access to an operation does not mean this gets activated.

This is different in the standalone flight tracks setup, there any new flight track is activated. This makes no sense in mscolab. (We likly change this behaviour also with local flight tracks)

I think this mismatch creates the wrong bold names in the docking widget for mscolab operations.

@ReimarBauer
Copy link
Member

We need a way to leave the mode. One option could be on closing the docking widget. When doing this we should keep only the activated one. Nothing else.

get_back_only_one

@ReimarBauer
Copy link
Member

We decided earlier that any activated gets the check mark. This has a site effect by clicking any available flight track means activates all.

This should become documented, e.g. comment or description

@ReimarBauer
Copy link
Member

There is now a little delay on activation until it is seen, can the speed improved?

@ReimarBauer
Copy link
Member

ReimarBauer commented Nov 7, 2022

When a topview is started when some data is loaded, all is shown in the docking widget with flight track color. Changing the color in the options menu does not update the color for the active flight track.
The first part of the sample video shows single data mode, without the docking widget. The problem is shown on the second top view.

color_changed_needs_to_mark active_one

This is done on a new activation.

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx

self.color_change = None
self.color_change = False
self.change_linewidth = False
self.dsbx_linewidth.setValue(2.0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a # ToDo to use an invented constant from https://github.com/Open-MSS/MSS/blob/develop/mslib/utils/config.py#L227 for initializing this.

@@ -172,7 +174,8 @@ def create_list_item(self, wp_model, listWidget):
# Create new key in dict
self.dict_flighttrack[wp_model] = {}
self.dict_flighttrack[wp_model]["patch"] = None
self.dict_flighttrack[wp_model]["color"] = 'blue'
self.dict_flighttrack[wp_model]["color"] = None
self.dict_flighttrack[wp_model]["linewidth"] = 2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a float

@@ -478,7 +478,7 @@ def select_file(self, filenames):
return
text = filename
if text not in self.dict_files: # prevents same file being added twice
# initializing the nested dictionary dict_files
# initializing the nested dictionary dict_flighttrack
self.dict_files[text] = {}
self.dict_files[text]["patch"] = None
self.dict_files[text]["color"] = (0, 0, 0, 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

search for "colour_ft_vertices" this may be the initial color

@ReimarBauer ReimarBauer merged commit 5d98dbc into Open-MSS:GSOC2022-JatinJain Nov 8, 2022
ReimarBauer pushed a commit that referenced this pull request Nov 21, 2022
* updated_multiple_flightpath_dockwidget

* set_activated_track_as_uncheckable

* changed_flags_naming

* improved_list_naming

* flickering_topview_solved

* change_color_of_selected_flightpath

* show_color_icon

* update_previously_activated_flighttrack_wp_model_in_dict

* check_previously_activated_track

* change_linewidth

* plot_operations_topview

* bug_fixes

* checkmark_protection_behaviour_updated

* show_flighttrack_color_icon

* defined_coloring_of_operation_flightpaths

* add_todos

* add_comments

* fixed_coloring_of_flighttracks

* clear_operation_list_after_logout

* signals_disconnected_after_logout

* update_last_used_operation

* fixed_test

* fixed_color

* implemented_operation_permission_revoked

* revoked_mscolab_permission

* change_operations_linewidth

* fixed_uncheck_operations

* remove_filter_flightpaths_test

* color_change_updated

* removed_activation_of_operations_on_addition

* Update msui.py

* fixed_tracks_coloring

* add_todos
ReimarBauer added a commit that referenced this pull request Nov 21, 2022
* Filter flight paths (#1488)

* filter_flight_paths

* fixed_msui

* changed endpoints names and fixed typos

* inactivated_operation_list_updated

* added_tests

* fixed_pytest_error

* added_mscolab_tests

* enable_github_testing

* changed_branch name_in_testing-develop.yml

* initialized_"last_used"_attribute

* refactored_failing_tests

* refactored_failing_tests

* Multiple Flightpath on Topview (#1510)

* multiple_flightpath_dockwidget

* updated_multiple_flightpath_dockwidget

* connect_slots_and_signals_to_open_ftml_files

* Update ui_multiple_flightpath_dockwidget.py

* updated_author_and_copyright_year

* plot_multiple_flighttracks

* remove_flighttrack_added

* remove_unchecked_flighttracks_from_canvas

* Update mpl_qtwidget.py

* reversed_plotting_of_lat_lon

* plot_flighttracks_from_MSUIMainWindow

* plot_inactive_flighttracks

* fixed_naming

* sync_listViews

* fixed_namespaces

* Mscolab Chat Improvements (#1508)

* timestamps_below_messages

* added_ToDo

* updated_multiple_flightpath_dockwidget (#1544)

* updated_multiple_flightpath_dockwidget

* set_activated_track_as_uncheckable

* changed_flags_naming

* improved_list_naming

* flickering_topview_solved

* change_color_of_selected_flightpath

* show_color_icon

* update_previously_activated_flighttrack_wp_model_in_dict

* check_previously_activated_track

* change_linewidth

* plot_operations_topview

* bug_fixes

* checkmark_protection_behaviour_updated

* show_flighttrack_color_icon

* defined_coloring_of_operation_flightpaths

* add_todos

* add_comments

* fixed_coloring_of_flighttracks

* clear_operation_list_after_logout

* signals_disconnected_after_logout

* update_last_used_operation

* fixed_test

* fixed_color

* implemented_operation_permission_revoked

* revoked_mscolab_permission

* change_operations_linewidth

* fixed_uncheck_operations

* remove_filter_flightpaths_test

* color_change_updated

* removed_activation_of_operations_on_addition

* Update msui.py

* fixed_tracks_coloring

* add_todos

* Add Documentation for Multiple Flightpath Dockwidget (#1595)

* small_code_enhancements

* update_documentation

* flake8

* Empty-Commit

Co-authored-by: Jatin Jain <72596619+Jatin2020-24@users.noreply.github.com>
Co-authored-by: Jatin Jain <jatinalwar2001@gmail.com>
ReimarBauer pushed a commit that referenced this pull request Nov 21, 2022
* Filter flight paths (#1488)

* filter_flight_paths

* fixed_msui

* changed endpoints names and fixed typos

* inactivated_operation_list_updated

* added_tests

* fixed_pytest_error

* added_mscolab_tests

* enable_github_testing

* changed_branch name_in_testing-develop.yml

* initialized_"last_used"_attribute

* refactored_failing_tests

* refactored_failing_tests

* Multiple Flightpath on Topview (#1510)

* multiple_flightpath_dockwidget

* updated_multiple_flightpath_dockwidget

* connect_slots_and_signals_to_open_ftml_files

* Update ui_multiple_flightpath_dockwidget.py

* updated_author_and_copyright_year

* plot_multiple_flighttracks

* remove_flighttrack_added

* remove_unchecked_flighttracks_from_canvas

* Update mpl_qtwidget.py

* reversed_plotting_of_lat_lon

* plot_flighttracks_from_MSUIMainWindow

* plot_inactive_flighttracks

* fixed_naming

* sync_listViews

* fixed_namespaces

* Mscolab Chat Improvements (#1508)

* timestamps_below_messages

* added_ToDo

* updated_multiple_flightpath_dockwidget (#1544)

* updated_multiple_flightpath_dockwidget

* set_activated_track_as_uncheckable

* changed_flags_naming

* improved_list_naming

* flickering_topview_solved

* change_color_of_selected_flightpath

* show_color_icon

* update_previously_activated_flighttrack_wp_model_in_dict

* check_previously_activated_track

* change_linewidth

* plot_operations_topview

* bug_fixes

* checkmark_protection_behaviour_updated

* show_flighttrack_color_icon

* defined_coloring_of_operation_flightpaths

* add_todos

* add_comments

* fixed_coloring_of_flighttracks

* clear_operation_list_after_logout

* signals_disconnected_after_logout

* update_last_used_operation

* fixed_test

* fixed_color

* implemented_operation_permission_revoked

* revoked_mscolab_permission

* change_operations_linewidth

* fixed_uncheck_operations

* remove_filter_flightpaths_test

* color_change_updated

* removed_activation_of_operations_on_addition

* Update msui.py

* fixed_tracks_coloring

* add_todos

* Add Documentation for Multiple Flightpath Dockwidget (#1595)

* small_code_enhancements

* update_documentation

* flake8

* Empty-Commit

Co-authored-by: Jatin Jain <72596619+Jatin2020-24@users.noreply.github.com>
Co-authored-by: Jatin Jain <jatinalwar2001@gmail.com>
ReimarBauer added a commit that referenced this pull request Nov 21, 2022
* Filter flight paths (#1488)

* filter_flight_paths

* fixed_msui

* changed endpoints names and fixed typos

* inactivated_operation_list_updated

* added_tests

* fixed_pytest_error

* added_mscolab_tests

* enable_github_testing

* changed_branch name_in_testing-develop.yml

* initialized_"last_used"_attribute

* refactored_failing_tests

* refactored_failing_tests

* Multiple Flightpath on Topview (#1510)

* multiple_flightpath_dockwidget

* updated_multiple_flightpath_dockwidget

* connect_slots_and_signals_to_open_ftml_files

* Update ui_multiple_flightpath_dockwidget.py

* updated_author_and_copyright_year

* plot_multiple_flighttracks

* remove_flighttrack_added

* remove_unchecked_flighttracks_from_canvas

* Update mpl_qtwidget.py

* reversed_plotting_of_lat_lon

* plot_flighttracks_from_MSUIMainWindow

* plot_inactive_flighttracks

* fixed_naming

* sync_listViews

* fixed_namespaces

* Mscolab Chat Improvements (#1508)

* timestamps_below_messages

* added_ToDo

* updated_multiple_flightpath_dockwidget (#1544)

* updated_multiple_flightpath_dockwidget

* set_activated_track_as_uncheckable

* changed_flags_naming

* improved_list_naming

* flickering_topview_solved

* change_color_of_selected_flightpath

* show_color_icon

* update_previously_activated_flighttrack_wp_model_in_dict

* check_previously_activated_track

* change_linewidth

* plot_operations_topview

* bug_fixes

* checkmark_protection_behaviour_updated

* show_flighttrack_color_icon

* defined_coloring_of_operation_flightpaths

* add_todos

* add_comments

* fixed_coloring_of_flighttracks

* clear_operation_list_after_logout

* signals_disconnected_after_logout

* update_last_used_operation

* fixed_test

* fixed_color

* implemented_operation_permission_revoked

* revoked_mscolab_permission

* change_operations_linewidth

* fixed_uncheck_operations

* remove_filter_flightpaths_test

* color_change_updated

* removed_activation_of_operations_on_addition

* Update msui.py

* fixed_tracks_coloring

* add_todos

* Add Documentation for Multiple Flightpath Dockwidget (#1595)

* small_code_enhancements

* update_documentation

* flake8

* Empty-Commit

Co-authored-by: Jatin Jain <72596619+Jatin2020-24@users.noreply.github.com>
Co-authored-by: Jatin Jain <jatinalwar2001@gmail.com>

Co-authored-by: Jatin Jain <jatinalwar2001@gmail.com>
Co-authored-by: Jatin Jain <72596619+Jatin2020-24@users.noreply.github.com>
joernu76 pushed a commit that referenced this pull request Nov 21, 2022
* Filter flight paths (#1488)

* filter_flight_paths

* fixed_msui

* changed endpoints names and fixed typos

* inactivated_operation_list_updated

* added_tests

* fixed_pytest_error

* added_mscolab_tests

* enable_github_testing

* changed_branch name_in_testing-develop.yml

* initialized_"last_used"_attribute

* refactored_failing_tests

* refactored_failing_tests

* Multiple Flightpath on Topview (#1510)

* multiple_flightpath_dockwidget

* updated_multiple_flightpath_dockwidget

* connect_slots_and_signals_to_open_ftml_files

* Update ui_multiple_flightpath_dockwidget.py

* updated_author_and_copyright_year

* plot_multiple_flighttracks

* remove_flighttrack_added

* remove_unchecked_flighttracks_from_canvas

* Update mpl_qtwidget.py

* reversed_plotting_of_lat_lon

* plot_flighttracks_from_MSUIMainWindow

* plot_inactive_flighttracks

* fixed_naming

* sync_listViews

* fixed_namespaces

* Mscolab Chat Improvements (#1508)

* timestamps_below_messages

* added_ToDo

* updated_multiple_flightpath_dockwidget (#1544)

* updated_multiple_flightpath_dockwidget

* set_activated_track_as_uncheckable

* changed_flags_naming

* improved_list_naming

* flickering_topview_solved

* change_color_of_selected_flightpath

* show_color_icon

* update_previously_activated_flighttrack_wp_model_in_dict

* check_previously_activated_track

* change_linewidth

* plot_operations_topview

* bug_fixes

* checkmark_protection_behaviour_updated

* show_flighttrack_color_icon

* defined_coloring_of_operation_flightpaths

* add_todos

* add_comments

* fixed_coloring_of_flighttracks

* clear_operation_list_after_logout

* signals_disconnected_after_logout

* update_last_used_operation

* fixed_test

* fixed_color

* implemented_operation_permission_revoked

* revoked_mscolab_permission

* change_operations_linewidth

* fixed_uncheck_operations

* remove_filter_flightpaths_test

* color_change_updated

* removed_activation_of_operations_on_addition

* Update msui.py

* fixed_tracks_coloring

* add_todos

* Add Documentation for Multiple Flightpath Dockwidget (#1595)

* small_code_enhancements

* update_documentation

* flake8

* Empty-Commit

Co-authored-by: Jatin Jain <72596619+Jatin2020-24@users.noreply.github.com>
Co-authored-by: Jatin Jain <jatinalwar2001@gmail.com>
Co-authored-by: ReimarBauer <rb.proj@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants