Bug: Importing Routes in MDT Doesn't Update Existing Routes
chatterchats opened this issue ยท 0 comments
Bug: Importing Routes in MDT Doesn't Update Existing Routes
Description
When importing a route in the Mythic Dungeon Tools (MDT) addon, it never prompts to update an existing route if the route already exists. Instead, it imports the route as a new one every time.
Steps to Reproduce
- Import a route in MDT.
- Attempt to import the same route again.
- Notice that instead of updating the existing route, a new duplicate route is created.
Expected Behavior
If a route already exists with the same name or unique identifier (UID), MDT should prompt to update the existing route rather than importing it as a new one.
Actual Behavior
MDT always imports the route as a new one, even if a duplicate route exists.
Cause
The issue seems to stem from the following code blocks in MythicDungeonTools.lua
and Modules/Transmission.lua
:
MythicDungeonTools/MythicDungeonTools.lua
Lines 3057 to 3062 in 2a08c91
MythicDungeonTools/Modules/Transmission.lua
Lines 767 to 787 in 2a08c91
This logic always assigns a new unique ID (uid
) during the first import. As a result, subsequent imports can never find a duplicate in the following check in MDT:ImportPreset()
:
MythicDungeonTools/MythicDungeonTools.lua
Lines 3017 to 3023 in 2a08c91
Because a new uid
is assigned, the duplicate detection mechanism fails, and the route is treated as a new one rather than updating the existing one.
Suggested Fix
Consider adjusting the logic to retain the uid
when importing, so that subsequent imports can correctly identify and update the existing route.
Additional Information
- MDT Version: 5.1.2 & (after updating) 5.1.5
- WoW Version: 11.0.2
- Addons Installed:
- Custom AddOn I'm working on, that can batch import to MDT
- ElvUI (with and without)
- MDT