Skip to content

Commit

Permalink
Release Step sequencing (replace mode) v1.1.4 (#1463)
Browse files Browse the repository at this point in the history
Fix toggling "Skip unselected notes" in the fallback (non-ReaImGui) options menu [p=2823664]
  • Loading branch information
cfillion authored Nov 19, 2024
1 parent 6c6189f commit 9e249c9
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions MIDI Editor/cfillion_Step sequencing (replace mode).lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- @description Step sequencing (replace mode)
-- @author cfillion
-- @version 1.1.3
-- @changelog Internal code cleanup
-- @version 1.1.4
-- @changelog Fix toggling "Skip unselected notes" in the fallback (non-ReaImGui) options menu [p=2823664]
-- @provides
-- .
-- [main] . > cfillion_Step sequencing (options).lua
Expand Down Expand Up @@ -422,21 +422,22 @@ local function optionsMenu(mode, items)
end

local function legacyOptionsMenu(mode, items)
local menu = {}
local menu, values = {}, {}

for id, item in ipairs(items) do
if type(item) == 'table' then
local checkbox = mode & item[1] ~= 0 and '!' or ''
table.insert(values, item[1])
table.insert(menu, checkbox .. item[2])
else
table.insert(menu, item)
end
end

local choice = gfx.showmenu(table.concat(menu, '|'))
if not items[choice] then return end
if not values[choice] then return end

mode = mode ~ items[choice][1]
mode = mode ~ values[choice]
reaper.SetExtState(EXT_SECTION, EXT_MODE_KEY, mode, true)
end

Expand All @@ -454,6 +455,7 @@ if scriptName:match('%(options%)') then
else
gfxdo(function() legacyOptionsMenu(mode, items) end)
end

return
end

Expand Down

0 comments on commit 9e249c9

Please sign in to comment.