diff options
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; | 
