dlr-gtlab / gtlab-core

GTlab Core Framework
https://www.gtlab.de
Other
7 stars 2 forks source link

Resolve "A project cannot be deleted from the session using the delete key" - [merged] #1048

Closed rainman110 closed 11 months ago

rainman110 commented 1 year ago

In GitLab by @mariusalexander on Jun 29, 2023, 12:37

Merges 564-a-project-cannot-be-deleted-from-the-session-using-the-delete-key -> master

Description

Added option to remove a single project from session using the delete key (Closes #564)

Added utility method for filtering a list of objects by certain types:

QList<GtObject*> objects = ...;
QList<GtProjects*> projects = gt::filterObjects<GtProject*>(objects);

How Has This Been Tested?

Manually. Added test for filterObjects.

Checklist:

rainman110 commented 1 year ago

In GitLab by @mariusalexander on Jun 29, 2023, 12:55

added 1 commit

Compare with previous version

rainman110 commented 1 year ago

In GitLab by @mariusalexander on Jun 29, 2023, 13:09

added 1 commit

Compare with previous version

rainman110 commented 1 year ago

In GitLab by @mariusalexander on Jun 29, 2023, 13:14

Commented on src/app/dock_widgets/explorer/gt_explorerdock.cpp line 215

The previous implementation aborted the casting operations if an object was not a GtProject*. My solution does not do that.

Do you think this is fine here (I think there often just a few objects selected)? Otherwise I may have to find a more elgant solution

rainman110 commented 1 year ago

In GitLab by @mariusalexander on Jun 29, 2023, 13:36

Commented on src/gui/object_ui/gt_projectui.h line 94

changed this line in version 3 of the diff

rainman110 commented 1 year ago

In GitLab by @mariusalexander on Jun 29, 2023, 13:36

added 1 commit

Compare with previous version

rainman110 commented 1 year ago

In GitLab by @mariusalexander on Jun 30, 2023, 07:58

Commented on src/app/dock_widgets/explorer/gt_explorerdock.cpp line 687

When deleting the project using the action shortcut this message will be printed as well, so I changed its verbosity

rainman110 commented 1 year ago

In GitLab by @mariusalexander on Jul 3, 2023, 09:00

marked this merge request as ready

rainman110 commented 1 year ago

In GitLab by @mariusalexander on Jul 3, 2023, 09:00

requested review from @rainman110 and @jensschmeink

rainman110 commented 1 year ago

In GitLab by @mariusalexander on Jul 3, 2023, 09:29

@jensschmeink @rainman110 Please have a look

rainman110 commented 1 year ago

In GitLab by @jensschmeink on Jul 3, 2023, 09:53

Commented on src/app/dock_widgets/explorer/gt_explorerdock.cpp line 215

I think it is ok as we normaly just have projects in the order of 5 maybe 10. And even for 100 the deletion will cause more time consuming processes than the few casts. Overall: I'm fine with this.

rainman110 commented 1 year ago

In GitLab by @jensschmeink on Jul 3, 2023, 09:54

@mariusalexander I'm fine with this MR. Maybe we should collect topics like this for updates of the GUI-tests.

rainman110 commented 1 year ago

In GitLab by @jensschmeink on Jul 3, 2023, 09:55

approved this merge request

rainman110 commented 1 year ago

In GitLab by @mariusalexander on Jul 3, 2023, 10:59

mentioned in commit 6e7010870c798ecc3abbef90b6cbc2edccde4d96

rainman110 commented 1 year ago

In GitLab by @mariusalexander on Jul 3, 2023, 11:01

Added an issue for this