mirror of
https://github.com/gen2brain/cbconvert
synced 2026-06-30 09:11:54 +02:00
Destroy current image
This commit is contained in:
@@ -271,6 +271,7 @@ func onRemove(ih iup.Ihandle) int {
|
||||
|
||||
// clearPreview resets the preview state and repaints the canvas to its empty state.
|
||||
func clearPreview() {
|
||||
iup.Destroy(iup.GetHandle("cover"))
|
||||
hasCover = false
|
||||
previewPath = ""
|
||||
previewPage = 0
|
||||
|
||||
@@ -167,6 +167,7 @@ func previewMessage(ih iup.Ihandle, s string, i int, p any) int {
|
||||
hasCover = true
|
||||
iup.GetHandle("PreviewInfo").SetAttribute("TITLE", fmt.Sprintf("%s (%dx%d)", img.SizeHuman, img.Width, img.Height))
|
||||
} else {
|
||||
iup.Destroy(iup.GetHandle("cover"))
|
||||
hasCover = false
|
||||
iup.GetHandle("PreviewInfo").SetAttribute("TITLE", "")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user