diff --git a/php/includes/mk/map.php b/php/includes/mk/map.php index ea302dd5..afb7a6fe 100755 --- a/php/includes/mk/map.php +++ b/php/includes/mk/map.php @@ -8,7 +8,7 @@ $circuitMainData = $circuitPayload->main; echo '{'; printCircuitPart($circuit, 0,$circuitPayload); - if (isset($circuitPayload->lapOverrides)) { + if (isset($circuitPayload->lapOverrides) && !isset($circuitMainData->sections)) { echo ',"lapOverrides":{'; $v = ''; foreach ($circuitPayload->lapOverrides as $lapKey => $lapData) { diff --git a/scripts/editor.js b/scripts/editor.js index 438755f5..42036c84 100755 --- a/scripts/editor.js +++ b/scripts/editor.js @@ -3415,6 +3415,10 @@ function applyColorSelector() { document.getElementById("button-bgcolor").style.backgroundColor = "rgb("+bgColor.r+","+bgColor.g+","+bgColor.b+")"; document.body.style.backgroundColor = "rgb("+bgColor.r+","+bgColor.g+","+bgColor.b+")"; } +function initOverrideSelector() { + var editorTool = editorTools.checkpoints; + document.getElementById("lapoverride-opener").style.display = editorTool && !editorTool.data.type ? "block":"none"; +} function showMusicSelector() { var $music = document.getElementById("music-selector"); document.body.removeChild($music); @@ -6098,6 +6102,7 @@ var commonTools = { applyMusicSelector(); document.body.classList.add("setting-preview"); applyColorSelector(); + initOverrideSelector(); }, "click" : function() { },