diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-06-01 17:08:47 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-06-01 17:08:47 +0200 |
commit | d0b6a8a4ec298024f14f704f9e40a6f9d324ccf3 (patch) | |
tree | 8645f5abd7b89361a1c5ab67e0195c84bc2ceab0 /app/bin/draw.c | |
parent | c2b8ba9336499ac930802e957f0d150399f3191e (diff) | |
parent | abf57604846230dc26afe8011aefb8e7bcc34333 (diff) |
Merge debian/watchdebian/1_5.1.2a-1
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; |