-
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
LUA: importing an image does not force a refresh of the new thumbtable #4889
Comments
Verified in current git. Tested in 3.0.2 and it works correctly. Image thumbnail is displayed on import. |
@wpferguson I'm not sure I understoos, do you mean that the bug is confirmed in current git ? |
We certainly miss a refresh or a signal raising. |
The dt.database.import() function is in src/lua/database.c. It calls
dt_image_import_lua() in src/common/image.c.
If I'm in lighttable and I import a single image into darktable, the image
opens in darkroom view. When I return to lighttable view, the thumbnail is
created/updated. When I import the image with dt.database.import() in lua,
I stay in lighttable mode (which is expected). I'm thinking that a call to
refresh the lighttable could be added just before or after line 160 of
src/lua/database.c. I'm just not sure what the call is to refresh the
lighttable view.
…On Sat, May 2, 2020 at 3:08 PM AlicVB ***@***.***> wrote:
We certainly miss a refresh or a signal raising.
Sadly I have absolutely no idea how the lua calls are handled in the code.
I'll have a look, but if someone with more lua knowledge can help me :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4889 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMPES2A33M6BJMWI2BJMRDRPRVR5ANCNFSM4MXFQZMA>
.
|
Adding the lines
after line 160 of src/lua/database.c, as suggested by @wpferguson, does the trick. This makes me think there could be other side effects of the new thumbtable on lua calls. This needs further investigation. |
@Mark-64 : exactly ! it's so great to see other people fixing my oversights :) And you're right to say that we need to investigate further the lua parts, as I don't know this part well... Thanks again ! |
I'll test the code that manipulates the lighttable and make sure there
aren't any other issues.
…On Sun, May 3, 2020, 7:14 AM AlicVB ***@***.***> wrote:
@Mark-64 <https://github.com/Mark-64> : exactly ! it's so great to see
other people fixing my oversights :)
That said, I think you can enhance your code by indicating the inserted
image in the first fct, something like dt_collection_update_query(darktable.collection,
DT_COLLECTION_CHANGE_RELOAD, g_list_append(NULL, GINT_TO_POINTER(result));
(not tested)
And you're right to say that we need to investigate further the lua parts,
as I don't know this part well...
Thanks again !
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4889 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMPESYB76YTHX6E3XYLVH3RPVGZVANCNFSM4MXFQZMA>
.
|
@AlicVB I dont't fully understand what the enhancement you suggested does, but I implemented and tested it, no issues. |
@Mark-64 : the last parameter is to say which imageid have changed. That avoid for example to refresh all the view if the image is located outside. |
I didn't find any more issues manipulating the view from lua. |
Fixed |
With lua, the lib function
dt.database.import()
was used to force a refresh of lighttable so the image appeared immediately in the collection.No longer so with the new thumbtable. The image is indeed imported, but the view isn't refreshed.
Forcing manually a refresh by changing back and forth film roll or going in and out of darkroom, makes the imported image show in the collection.
DT 3.1 git master on Windows 10
The text was updated successfully, but these errors were encountered: