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.
|
// clearPreview resets the preview state and repaints the canvas to its empty state.
|
||||||
func clearPreview() {
|
func clearPreview() {
|
||||||
|
iup.Destroy(iup.GetHandle("cover"))
|
||||||
hasCover = false
|
hasCover = false
|
||||||
previewPath = ""
|
previewPath = ""
|
||||||
previewPage = 0
|
previewPage = 0
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ func previewMessage(ih iup.Ihandle, s string, i int, p any) int {
|
|||||||
hasCover = true
|
hasCover = true
|
||||||
iup.GetHandle("PreviewInfo").SetAttribute("TITLE", fmt.Sprintf("%s (%dx%d)", img.SizeHuman, img.Width, img.Height))
|
iup.GetHandle("PreviewInfo").SetAttribute("TITLE", fmt.Sprintf("%s (%dx%d)", img.SizeHuman, img.Width, img.Height))
|
||||||
} else {
|
} else {
|
||||||
|
iup.Destroy(iup.GetHandle("cover"))
|
||||||
hasCover = false
|
hasCover = false
|
||||||
iup.GetHandle("PreviewInfo").SetAttribute("TITLE", "")
|
iup.GetHandle("PreviewInfo").SetAttribute("TITLE", "")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user