Skip to content

Commit

Permalink
Release Step sequencing (replace mode) v1.1.4
Browse files Browse the repository at this point in the history
Fix toggling "Skip unselected notes" in the legacy (non-ReaImGui) options menu [p=2823664]
  • Loading branch information
cfillion committed Nov 19, 2024
1 parent 6c6189f commit d5fe4ce
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 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 legacy (non-ReaImGui) options menu [p=2823664]
-- @provides
-- .
-- [main] . > cfillion_Step sequencing (options).lua
Expand Down Expand Up @@ -423,20 +423,22 @@ end

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

for id, item in ipairs(items) do
if type(item) == 'table' then
local checkbox = mode & item[1] ~= 0 and '!' or ''
table.insert(menu, checkbox .. item[2])
table.insert(values, item[1])
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 +456,7 @@ if scriptName:match('%(options%)') then
else
gfxdo(function() legacyOptionsMenu(mode, items) end)
end

return
end

Expand Down

0 comments on commit d5fe4ce

Please sign in to comment.