Prevent preview window repositioning on file/preset changes
- Remove all automatic preview window close+reopen on file change - Remove preview reopen from preset New/Clone/Rename/Delete actions - Preview title may be stale after preset change but window stays in place - User can press Fit to update title when desired
This commit is contained in:
parent
67edfb0b1d
commit
673e114753
|
|
@ -1496,14 +1496,11 @@ openPreviewWindow = function()
|
|||
if presetForFile ~= S.currentPreset then
|
||||
loadPreset(presetForFile)
|
||||
S.currentPreset = presetForFile
|
||||
-- Refresh UI if main dialog is open
|
||||
-- Refresh UI if main dialog is open (don't touch preview - avoids repositioning)
|
||||
if mainDlg then
|
||||
pcall(function() mainDlg:close() end)
|
||||
openMainDialog()
|
||||
end
|
||||
-- Reopen preview to update title
|
||||
pcall(function() previewDlg:close() end)
|
||||
openPreviewWindow()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -1664,11 +1661,7 @@ openMainDialog = function()
|
|||
d:close()
|
||||
if mainDlg then pcall(function() mainDlg:close() end) end
|
||||
openMainDialog()
|
||||
-- Reopen preview to update title
|
||||
if previewDlg then
|
||||
pcall(function() previewDlg:close() end)
|
||||
openPreviewWindow()
|
||||
end
|
||||
-- Preview title will be stale but avoids repositioning window
|
||||
end
|
||||
end }
|
||||
d:button{ id = "presetClone", text = "Clone", onclick = function()
|
||||
|
|
@ -1699,11 +1692,7 @@ openMainDialog = function()
|
|||
d:close()
|
||||
if mainDlg then pcall(function() mainDlg:close() end) end
|
||||
openMainDialog()
|
||||
-- Reopen preview to update title
|
||||
if previewDlg then
|
||||
pcall(function() previewDlg:close() end)
|
||||
openPreviewWindow()
|
||||
end
|
||||
-- Preview title will be stale but avoids repositioning window
|
||||
end
|
||||
end }
|
||||
d:button{ id = "presetRename", text = "Rename", onclick = function()
|
||||
|
|
@ -1748,11 +1737,7 @@ openMainDialog = function()
|
|||
d:close()
|
||||
if mainDlg then pcall(function() mainDlg:close() end) end
|
||||
openMainDialog()
|
||||
-- Reopen preview to update title
|
||||
if previewDlg then
|
||||
pcall(function() previewDlg:close() end)
|
||||
openPreviewWindow()
|
||||
end
|
||||
-- Preview title will be stale but avoids repositioning window
|
||||
end
|
||||
end }
|
||||
d:button{ id = "presetDelete", text = "Delete", onclick = function()
|
||||
|
|
@ -1871,11 +1856,7 @@ openMainDialog = function()
|
|||
if presetChanged then
|
||||
dlg:close()
|
||||
openMainDialog()
|
||||
-- Reopen preview to update title
|
||||
if previewDlg then
|
||||
pcall(function() previewDlg:close() end)
|
||||
openPreviewWindow()
|
||||
end
|
||||
-- Preview title will be stale but avoids repositioning window
|
||||
return
|
||||
end
|
||||
dlg:repaint()
|
||||
|
|
@ -3257,11 +3238,6 @@ openMainDialog = function()
|
|||
S.currentPreset = presetForFile
|
||||
pcall(function() dlg:close() end)
|
||||
openMainDialog()
|
||||
-- Reopen preview to update title
|
||||
if previewDlg then
|
||||
pcall(function() previewDlg:close() end)
|
||||
openPreviewWindow()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue