Commit 37b54dd3 authored by ROOL's avatar ROOL 🤖
Browse files

Reduce flicker when changing aspect preserving zoom level

Detail:
  Avoid unnecessary redraws.
Admin:
  Submission for Paint bounty.

Version 2.45. Tagged as 'Paint-2_45'
parent c93290d9
......@@ -9,12 +9,12 @@
GBLS Module_ApplicationDate
GBLS Module_HelpVersion
GBLS Module_ComponentName
Module_MajorVersion SETS "2.44"
Module_Version SETA 244
Module_MajorVersion SETS "2.45"
Module_Version SETA 245
Module_MinorVersion SETS ""
Module_Date SETS "30 Aug 2021"
Module_ApplicationDate SETS "30-Aug-21"
Module_Date SETS "16 Oct 2021"
Module_ApplicationDate SETS "16-Oct-21"
Module_ComponentName SETS "Paint"
Module_FullVersion SETS "2.44"
Module_HelpVersion SETS "2.44 (30 Aug 2021)"
Module_FullVersion SETS "2.45"
Module_HelpVersion SETS "2.45 (16 Oct 2021)"
END
/* (2.44)
/* (2.45)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 2.44
#define Module_MajorVersion_CMHG 2.45
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 30 Aug 2021
#define Module_Date_CMHG 16 Oct 2021
#define Module_MajorVersion "2.44"
#define Module_Version 244
#define Module_MajorVersion "2.45"
#define Module_Version 245
#define Module_MinorVersion ""
#define Module_Date "30 Aug 2021"
#define Module_Date "16 Oct 2021"
#define Module_ApplicationDate "30-Aug-21"
#define Module_ApplicationDate "16-Oct-21"
#define Module_ComponentName "Paint"
#define Module_FullVersion "2.44"
#define Module_HelpVersion "2.44 (30 Aug 2021)"
#define Module_LibraryVersionInfo "2:44"
#define Module_FullVersion "2.45"
#define Module_HelpVersion "2.45 (16 Oct 2021)"
#define Module_LibraryVersionInfo "2:45"
......@@ -754,13 +754,13 @@ void sprwindow_event_handler (wimp_eventstr *e, void *handle)
newheight = targetheight;
if (useheight)
{ if ((zoomingout && targetheight > lastheight) ||
(zoomingin && targetheight < lastheight))
{ if ((zoomingout && targetheight >= lastheight) ||
(zoomingin && targetheight <= lastheight))
abortresize = TRUE;
}
else
{ if ((zoomingout && targetwidth > lastwidth) ||
(zoomingin && targetwidth < lastwidth))
{ if ((zoomingout && targetwidth >= lastwidth) ||
(zoomingin && targetwidth <= lastwidth))
abortresize = TRUE;
}
......@@ -787,8 +787,10 @@ void sprwindow_event_handler (wimp_eventstr *e, void *handle)
/*Apply the zoom*/
window->data->sprite.blobsize.scale_xdiv = zoomdiv;
window->data->sprite.blobsize.scale_xmul = zoommul;
menus_showmag_getstate (&window->data->sprite, newwidth, newheight, FALSE);
menus_insdel_frig ();
if (!abortresize)
{ menus_showmag_getstate (&window->data->sprite, newwidth, newheight, FALSE);
menus_insdel_frig ();
}
resize_start->mx = mouse.x;
resize_start->my = mouse.y;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment