inline if didn't work. Added intermediate register_event function in transition library

This commit is contained in:
wpferguson
2021-02-10 00:18:48 -05:00
parent 2b28f021ee
commit b1498aa664
33 changed files with 139 additions and 57 deletions

View File

@@ -45,6 +45,7 @@ USAGE
local dt = require "darktable"
local du = require "lib/dtutils"
require "lib/darktable_transition"
local debug = require "darktable.debug"
local qt = {}
@@ -257,7 +258,7 @@ if dt.gui.current_view().id == "lighttable" then
else
if not qt.event_registered then
dt.register_event(
CURR_API_STRING >= "6.2.1" and "quicktag", "view-changed" or "view-changed" ,
"quicktag", "view-changed",
function(event, old_view, new_view)
if new_view.name == "lighttable" and old_view.name == "darkroom" then
install_module()
@@ -270,7 +271,7 @@ end
-- create shortcuts
for i=1,qnr do
dt.register_event(CURR_API_STRING >= "6.2.1" and "quicktag", "shortcut" or "shortcut" ,
dt.register_event("quicktag", "shortcut",
function(event, shortcut) tagattach(tostring(quicktag_table[i])) end,
string.format(_("quicktag %i"),i))
end