Merge branch 'work' into tomerge

This commit is contained in:
Tim Edwards 2018-10-23 08:49:17 -04:00
commit a126a3fe74
3 changed files with 23 additions and 8 deletions

View File

@ -599,7 +599,13 @@ CIFPaintCurrent()
Plane **parray; Plane **parray;
extern char *(cifReadLayers[MAXCIFRLAYERS]); extern char *(cifReadLayers[MAXCIFRLAYERS]);
if (cifReadCellDef->cd_flags & CDFLATGDS) /* NOTE: There should be no need to check for cd_client
* here as cd_client should not be CLIENTDEFAULT if CDFLATGDS
* is set in flags. This condition has occurred, though, and
* needs to be debugged.
*/
if ((cifReadCellDef->cd_flags & CDFLATGDS) &&
(cifReadCellDef->cd_client != (ClientData)CLIENTDEFAULT))
parray = (Plane **)cifReadCellDef->cd_client; parray = (Plane **)cifReadCellDef->cd_client;
else else
{ {

View File

@ -984,6 +984,8 @@ ImgLayerConfigureInstance(instancePtr)
Tk_Window tkwind = instancePtr->tkwin; Tk_Window tkwind = instancePtr->tkwin;
MagWindow *mw, tmpmw; MagWindow *mw, tmpmw;
int saveStyle;
if (Tk_WindowId(tkwind) == 0) if (Tk_WindowId(tkwind) == 0)
Tk_MakeWindowExist(tkwind); Tk_MakeWindowExist(tkwind);
@ -1106,6 +1108,9 @@ ImgLayerConfigureInstance(instancePtr)
GrLock(&tmpmw, FALSE); GrLock(&tmpmw, FALSE);
/* Save the current state */
saveStyle = grCurDStyle;
/* First fill with background style */ /* First fill with background style */
GrSetStuff(STYLE_ERASEALL); GrSetStuff(STYLE_ERASEALL);
grInformDriver(); grInformDriver();
@ -1156,9 +1161,13 @@ ImgLayerConfigureInstance(instancePtr)
grInformDriver(); grInformDriver();
GrDrawGlyphNum(masterPtr->layerLock, 0, 0); GrDrawGlyphNum(masterPtr->layerLock, 0, 0);
} }
/* Restore the original state */
GrSetStuff(saveStyle);
grInformDriver();
GrUnlock(&tmpmw); GrUnlock(&tmpmw);
} }
return; return;
error: error:

View File

@ -553,8 +553,8 @@ proc magic::mgrupdate {win {cmdstr ""}} {
# Set default width and height to be 3/4 of the screen size. # Set default width and height to be 3/4 of the screen size.
set Opts(geometry) \ set Opts(geometry) \
"[expr 3 * [winfo screenwidth .] / 4]x[expr 3 * [winfo screenheight .] \ "[expr {3 * [winfo screenwidth .] / 4}]x[expr {3 * [winfo screenheight .] \
/ 4]+100+100" / 4}]+100+100"
# Procedures for the layout scrollbars, which are made from canvas # Procedures for the layout scrollbars, which are made from canvas
# objects to avoid the problems associated with Tk's stupid scrollbar # objects to avoid the problems associated with Tk's stupid scrollbar
@ -629,8 +629,8 @@ proc magic::cursorview {win} {
if {$cr == 0} {return} if {$cr == 0} {return}
set olst [${win} cursor internal] set olst [${win} cursor internal]
set olstx [expr [lindex $olst 0]] set olstx [lindex $olst 0]
set olsty [expr [lindex $olst 1]] set olsty [lindex $olst 1]
if {$Opts(crosshair)} { if {$Opts(crosshair)} {
*bypass crosshair ${olstx}i ${olsty}i *bypass crosshair ${olstx}i ${olsty}i
@ -638,8 +638,8 @@ proc magic::cursorview {win} {
# Use catch, because occasionally this fails on startup # Use catch, because occasionally this fails on startup
if {[catch { if {[catch {
set olstx [expr $olstx * $cr] set olstx [expr {$olstx * $cr}]
set olsty [expr $olsty * $cr] set olsty [expr {$olsty * $cr}]
}]} {return} }]} {return}
if {[${win} box exists]} { if {[${win} box exists]} {