-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[ui] Improve "Clear Images" action's behaviour and performance #1897
Conversation
The "Clear Images" action was performed solely on the QML side, updating the graph with every intrinsics removal, which considerably slowed down the whole process. The QML action now calls a slot on the Python side, which can disable the graph updates at every modification, thus greatly improving the speed of the process. As a point of comparison, clearing 511 PNG images took approximately 38s on the QML side, against 8s on the Python side. Clearing 1000 PNG images took 2min39 on the QML side, against 32s on the Python side.
I'm not sure we should be using "Ctrl-D" and "Ctrl-Shift-D" for clearing images since the letter D is usually reserved for duplicating. If that doesn't create any conflict I would rather use the letter X instead, what do you think ? |
We don't need to do that very often, so I think we can just remove the shortcut. |
e4ca0eb
to
b5d557b
Compare
I dropped the commit that added the shortcuts. |
b5d557b
to
775f440
Compare
626bd25
to
df26753
Compare
…viour "Clear Images" used to clear the intrinsics and viewpoints for all the existing CameraInit nodes in the graph. There was no-user friendly way to clear the images of a specific CameraInit node. This commit modifies the behaviour of "Clear Images" so that it only deletes the intrinsics and viewpoints of the current CameraInit. A new menu action, "Clear All Images", is added in the "Advanced" sub-menu, and deletes all the intrinsics and viewpoints for all the CameraInit nodes. The way images are cleared is also modified: instead of removing the intrinsics and viewpoints attributes, they are reset. To be undone properly, a corresponding "ClearImagesCommand" has been added. This offers a great performance increase (clearing 1000 images now takes 1s). Tooltips have been added to make the distinction clearer for users.
df26753
to
43f439b
Compare
Description
This PR modifies the behaviour of the "Clear Images" menu action as follows:
A "Clear All Images" action has been added in the "Advanced" sub-menu to clear the images of all the groups.
Tooltips have been added over both "Clear Images" and "Clear All Images" to make the distinction clear for users.
Features list