summaryrefslogtreecommitdiff
path: root/app/bin/draw.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-05-27 14:58:02 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-05-27 14:58:02 +0200
commit359b557176b9bb2ff1aed2082641eed39c358d0d (patch)
treef6c2baca2e6a5d06b7bf32e48e475a6b7b1ea262 /app/bin/draw.c
parent9a1d6eded2750572e9f5f79e53ec507dd7a06ba5 (diff)
New upstream version 5.1.2aupstream/5.1.2a
Diffstat (limited to 'app/bin/draw.c')
-rw-r--r--app/bin/draw.c20
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;