Skip to content

Commit

Permalink
DrawTool - Deselect file when turning off
Browse files Browse the repository at this point in the history
  • Loading branch information
tariqksoliman committed Sep 26, 2023
1 parent 2402e04 commit 3bc3e94
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/essence/Tools/Draw/DrawTool_Files.js
Original file line number Diff line number Diff line change
Expand Up @@ -1953,8 +1953,9 @@ var Files = {
(forceToggle != 'on' && DrawTool.filesOn.indexOf(id) != -1)
) {
//OFF
// Don't allow turning files off that are being drawn in
if (DrawTool.currentFileId == id) return
if (DrawTool.currentFileId == id) {
$(`.drawToolFileSelector[file_id=${id}]`).click()
}

DrawTool.filesOn = DrawTool.filesOn.filter(function (v) {
return v !== id
Expand Down

0 comments on commit 3bc3e94

Please sign in to comment.