diff options
| author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-05-27 14:58:13 +0200 | 
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-05-27 14:58:13 +0200 | 
| commit | 265d6934cd70a60228e7a11cfc000aff73dd4701 (patch) | |
| tree | 610eb753fea70e7f407e751e22697fc8a1ec04bd /app/bin/draw.c | |
| parent | bd8c21a35fd05fcbdaa95e4c0b7c94c3b97507b6 (diff) | |
| parent | 359b557176b9bb2ff1aed2082641eed39c358d0d (diff) | |
Update upstream source from tag 'upstream/5.1.2a'
Update to upstream version '5.1.2a'
with Debian dir 4d0d8239e41bb5de5dc968c2a5c6eb9c140bb2f3
Diffstat (limited to 'app/bin/draw.c')
| -rw-r--r-- | app/bin/draw.c | 20 | 
1 files changed, 11 insertions, 9 deletions
| diff --git a/app/bin/draw.c b/app/bin/draw.c index 3f25830..1a0a74f 100644 --- a/app/bin/draw.c +++ b/app/bin/draw.c @@ -1123,7 +1123,7 @@ static void ChangeMapScale( void )  	w = (wPos_t)fw;  	h = (wPos_t)fh;  	wWinSetSize( mapW, w+DlgSepLeft+DlgSepRight, h+DlgSepTop+DlgSepBottom ); -	wDrawSetSize( mapD.d, w, h ); +	wDrawSetSize( mapD.d, w, h, NULL );  } @@ -1298,26 +1298,28 @@ lprintf("mainRedraw\n");   * \param data additional data (unused)   */ -void MainProc( wWin_p win, winProcEvent e, void * data ) +void MainProc( wWin_p win, winProcEvent e, void * refresh, void * data )  {  	wPos_t width, height;  	switch( e ) {  	case wResize_e:  		if (mainD.d == NULL)  			return; -		DrawMapBoundingBox( FALSE ); +		if (refresh) DrawMapBoundingBox( FALSE );  		wWinGetSize( mainW, &width, &height ); -		LayoutToolBar(); +		LayoutToolBar(refresh);  		height -= (toolbarHeight+max(infoHeight,textHeight)+10);  		if (height >= 0) { -			wDrawSetSize( mainD.d, width-20, height ); +			wDrawSetSize( mainD.d, width-20, height, refresh );  			wControlSetPos( (wControl_p)mainD.d, 0, toolbarHeight );  			SetMainSize();  			ConstraintOrig( &mainD.orig, mainD.size );  			tempD.orig = mainD.orig;  			SetInfoBar(); -			MainRedraw(); -			MapRedraw(); +			if (!refresh) { +				MainRedraw(); +				MapRedraw(); +			} else DrawMapBoundingBox( TRUE );  			wPrefSetInteger( "draw", "mainwidth", width );  			wPrefSetInteger( "draw", "mainheight", height );  		} else	DrawMapBoundingBox( TRUE ); @@ -2255,7 +2257,7 @@ static void DoMouse( wAction_t action, coOrd pos )  				if ((MyGetKeyState() & WKEY_SHIFT) != 0)  					mainD.orig.y += 0.25*mainD.scale;  				else -					mainD.orig.y += mainD.size.x/2; +					mainD.orig.y += mainD.size.y/2;  				ConstraintOrig( &mainD.orig, mainD.size );  				mainCenter.x = mainD.orig.x + mainD.size.x/2.0;  				mainCenter.y = mainD.orig.y + mainD.size.y/2.0; @@ -2268,7 +2270,7 @@ static void DoMouse( wAction_t action, coOrd pos )  				if ((MyGetKeyState() & WKEY_SHIFT) != 0)  					mainD.orig.y -= 0.25*mainD.scale;  				else -					mainD.orig.y -= mainD.size.x/2; +					mainD.orig.y -= mainD.size.y/2;  				ConstraintOrig( &mainD.orig, mainD.size );  				mainCenter.x = mainD.orig.x + mainD.size.x/2.0;  				mainCenter.y = mainD.orig.y + mainD.size.y/2.0; | 
