Skip to content

Commit

Permalink
Delete last recorded item projextstate after warning if item has sinc…
Browse files Browse the repository at this point in the history
…e been removed
  • Loading branch information
chmaha committed Dec 17, 2024
1 parent 5aeb7cb commit 5fddf81
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions ReaClassical/ReaClassical_Rank Higher.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ function process_items()
modify_item_name(recorded_item)
else
MB("The previously recorded item no longer exists.", "ReaClassical Take Ranking", 0)
SetProjExtState(0, "ReaClassical", "LastRecordedItem", "")
end
end
end
Expand Down
1 change: 1 addition & 0 deletions ReaClassical/ReaClassical_Rank Lower.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ function process_items()
modify_item_name(recorded_item)
else
MB("The previously recorded item no longer exists.", "ReaClassical Take Ranking", 0)
SetProjExtState(0, "ReaClassical", "LastRecordedItem", "")
end
end
end
Expand Down
2 changes: 2 additions & 0 deletions ReaClassical/ReaClassical_Remove Ranking.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function modify_item_name(item)
item_name = item_name:gsub("[%+%-]+$", "")

reaper.GetSetMediaItemTakeInfo_String(take, "P_NAME", item_name, true)

SetMediaItemInfo_Value(item, "I_CUSTOMCOLOR", 0)

local group_id = GetMediaItemInfo_Value(item, "I_GROUPID")
Expand Down Expand Up @@ -83,6 +84,7 @@ function process_items()
modify_item_name(recorded_item)
else
MB("The previously recorded item no longer exists.", "ReaClassical Take Ranking", 0)
SetProjExtState(0, "ReaClassical", "LastRecordedItem", "")
end
end
end
Expand Down

0 comments on commit 5fddf81

Please sign in to comment.