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
|
if presetForFile ~= S.currentPreset then
|
||||||
loadPreset(presetForFile)
|
loadPreset(presetForFile)
|
||||||
S.currentPreset = 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
|
if mainDlg then
|
||||||
pcall(function() mainDlg:close() end)
|
pcall(function() mainDlg:close() end)
|
||||||
openMainDialog()
|
openMainDialog()
|
||||||
end
|
end
|
||||||
-- Reopen preview to update title
|
|
||||||
pcall(function() previewDlg:close() end)
|
|
||||||
openPreviewWindow()
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -1664,11 +1661,7 @@ openMainDialog = function()
|
||||||
d:close()
|
d:close()
|
||||||
if mainDlg then pcall(function() mainDlg:close() end) end
|
if mainDlg then pcall(function() mainDlg:close() end) end
|
||||||
openMainDialog()
|
openMainDialog()
|
||||||
-- Reopen preview to update title
|
-- Preview title will be stale but avoids repositioning window
|
||||||
if previewDlg then
|
|
||||||
pcall(function() previewDlg:close() end)
|
|
||||||
openPreviewWindow()
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end }
|
end }
|
||||||
d:button{ id = "presetClone", text = "Clone", onclick = function()
|
d:button{ id = "presetClone", text = "Clone", onclick = function()
|
||||||
|
|
@ -1699,11 +1692,7 @@ openMainDialog = function()
|
||||||
d:close()
|
d:close()
|
||||||
if mainDlg then pcall(function() mainDlg:close() end) end
|
if mainDlg then pcall(function() mainDlg:close() end) end
|
||||||
openMainDialog()
|
openMainDialog()
|
||||||
-- Reopen preview to update title
|
-- Preview title will be stale but avoids repositioning window
|
||||||
if previewDlg then
|
|
||||||
pcall(function() previewDlg:close() end)
|
|
||||||
openPreviewWindow()
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end }
|
end }
|
||||||
d:button{ id = "presetRename", text = "Rename", onclick = function()
|
d:button{ id = "presetRename", text = "Rename", onclick = function()
|
||||||
|
|
@ -1748,11 +1737,7 @@ openMainDialog = function()
|
||||||
d:close()
|
d:close()
|
||||||
if mainDlg then pcall(function() mainDlg:close() end) end
|
if mainDlg then pcall(function() mainDlg:close() end) end
|
||||||
openMainDialog()
|
openMainDialog()
|
||||||
-- Reopen preview to update title
|
-- Preview title will be stale but avoids repositioning window
|
||||||
if previewDlg then
|
|
||||||
pcall(function() previewDlg:close() end)
|
|
||||||
openPreviewWindow()
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end }
|
end }
|
||||||
d:button{ id = "presetDelete", text = "Delete", onclick = function()
|
d:button{ id = "presetDelete", text = "Delete", onclick = function()
|
||||||
|
|
@ -1871,11 +1856,7 @@ openMainDialog = function()
|
||||||
if presetChanged then
|
if presetChanged then
|
||||||
dlg:close()
|
dlg:close()
|
||||||
openMainDialog()
|
openMainDialog()
|
||||||
-- Reopen preview to update title
|
-- Preview title will be stale but avoids repositioning window
|
||||||
if previewDlg then
|
|
||||||
pcall(function() previewDlg:close() end)
|
|
||||||
openPreviewWindow()
|
|
||||||
end
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
dlg:repaint()
|
dlg:repaint()
|
||||||
|
|
@ -3257,11 +3238,6 @@ openMainDialog = function()
|
||||||
S.currentPreset = presetForFile
|
S.currentPreset = presetForFile
|
||||||
pcall(function() dlg:close() end)
|
pcall(function() dlg:close() end)
|
||||||
openMainDialog()
|
openMainDialog()
|
||||||
-- Reopen preview to update title
|
|
||||||
if previewDlg then
|
|
||||||
pcall(function() previewDlg:close() end)
|
|
||||||
openPreviewWindow()
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue