From ad465d6073e90da867788be7b279280e374a190f Mon Sep 17 00:00:00 2001 From: Franck Charlet Date: Tue, 23 Dec 2008 19:35:49 +0000 Subject: [PATCH] X & Y labels disappearing (issue 67) should be fixed. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@412 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- Grafx2.xcodeproj/xx.pbxuser | 4 ++-- Grafx2.xcodeproj/xx.perspective | 41 +++++++++++++++------------------ SFont.h | 4 ++-- brush.h | 4 ++-- moteur.c | 16 +++++++++---- windows.h | 4 ++-- 6 files changed, 39 insertions(+), 34 deletions(-) diff --git a/Grafx2.xcodeproj/xx.pbxuser b/Grafx2.xcodeproj/xx.pbxuser index c768b8ed..55f0922b 100644 --- a/Grafx2.xcodeproj/xx.pbxuser +++ b/Grafx2.xcodeproj/xx.pbxuser @@ -165,8 +165,8 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 251316027; - PBXWorkspaceStateSaveDate = 251316027; + PBXPerProjectTemplateStateSaveDate = 251751937; + PBXWorkspaceStateSaveDate = 251751937; }; sourceControlManager = F5B19B690EA4BD79003F4BA4 /* Source Control */; userBuildSettings = { diff --git a/Grafx2.xcodeproj/xx.perspective b/Grafx2.xcodeproj/xx.perspective index 2db4ef72..354329d0 100644 --- a/Grafx2.xcodeproj/xx.perspective +++ b/Grafx2.xcodeproj/xx.perspective @@ -222,6 +222,8 @@ Layout + BecomeActive + ContentConfiguration PBXBottomSmartGroupGIDs @@ -259,21 +261,18 @@ PBXSmartGroupTreeModuleOutlineStateExpansionKey 29B97314FDCFA39411CA2CEA - F5AE83FC0ECF8FD300200704 1C37FBAC04509CD000000102 - F5AE6EC90EDA116A000CE0EF - F5AE6FA80EDA1557000CE0EF - F5AE6FA90EDA1557000CE0EF 1C08E77C0454961000C914BD PBXSmartGroupTreeModuleOutlineStateSelectionKey + 9 0 PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 778}, {305, 536}} + {{0, 0}, {305, 536}} PBXTopSmartGroupGIDs @@ -290,7 +289,7 @@ 305 RubberWindowFrame - 81 61 953 595 0 0 1024 746 + 18 77 953 595 0 0 1024 746 Module PBXSmartGroupTreeModule @@ -329,7 +328,7 @@ Frame {{0, 0}, {626, 0}} RubberWindowFrame - 81 61 953 595 0 0 1024 746 + 18 77 953 595 0 0 1024 746 Module PBXNavigatorGroup @@ -342,8 +341,6 @@ Tabs - BecomeActive - ContentConfiguration PBXProjectModuleGUID @@ -356,7 +353,7 @@ Frame {{10, 27}, {626, 522}} RubberWindowFrame - 81 61 953 595 0 0 1024 746 + 18 77 953 595 0 0 1024 746 Module XCDetailModule @@ -415,11 +412,11 @@ TableOfContents - F5AE6FAA0EDA1557000CE0EF + F5AD5DDF0EFFAD7400C9C419 1CA23ED40692098700951B8B - F5AE6FAB0EDA1557000CE0EF + F5AD5DE00EFFAD7400C9C419 F5A33EBD0EC89C3000F8052D - F5AE6FAC0EDA1557000CE0EF + F5AD5DE10EFFAD7400C9C419 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -485,7 +482,7 @@ PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 0}, {123, 536}} + {{0, 0}, {0, 0}} PBXTopSmartGroupGIDs @@ -546,7 +543,7 @@ Proportion - 549pt + 0pt Tabs @@ -564,7 +561,7 @@ GeometryConfiguration Frame - {{10, 27}, {808, 522}} + {{10, 27}, {0, -27}} Module PBXBuildResultsModule @@ -626,7 +623,7 @@ Proportion - 808pt + 0pt Name @@ -644,14 +641,14 @@ TableOfContents - F5AE6FAD0EDA1557000CE0EF + F5AD5DE20EFFAD7400C9C419 1CA23EE50692099D00951B8B - F5AE6FAE0EDA1557000CE0EF + F5AD5DE30EFFAD7400C9C419 F5A33EC20EC89C3000F8052D - F5AE6FAF0EDA1557000CE0EF + F5AD5DE40EFFAD7400C9C419 XCMainBuildResultsModuleGUID 1CA23EE80692099D00951B8B - F5AE6FB00EDA1557000CE0EF + F5AD5DE50EFFAD7400C9C419 ToolbarConfiguration xcode.toolbar.config.buildAndRun @@ -825,7 +822,7 @@ /Users/xx/Grafx2/Grafx2.xcodeproj WindowString - 81 61 953 595 0 0 1024 746 + 18 77 953 595 0 0 1024 746 WindowTools diff --git a/SFont.h b/SFont.h index 6f3d8da8..bab55e9e 100644 --- a/SFont.h +++ b/SFont.h @@ -33,8 +33,8 @@ * contact me, if you problem isn' addressed anywhere. * * * ************************************************************************/ -#ifndef SFONT_H -#define SFONT_H +#ifndef _SFONT_H_ +#define _SFONT_H_ #include diff --git a/brush.h b/brush.h index cc73d72a..70de08f8 100644 --- a/brush.h +++ b/brush.h @@ -19,8 +19,8 @@ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef __BRUSHH__ -#define __BRUSHH__ +#ifndef __BRUSH_H_ +#define __BRUSH_H_ void Capturer_brosse(short Debut_X,short Debut_Y,short Fin_X,short Fin_Y,short Effacement); void Rotate_90_deg(void); diff --git a/moteur.c b/moteur.c index 5f4ea8b8..0d53caf4 100644 --- a/moteur.c +++ b/moteur.c @@ -39,6 +39,10 @@ #include "windows.h" #include "brush.h" +// we need this as global +static short Old_MX=0; +static short Old_MY=0; + //---------- Annuler les effets des modes de dessin (sauf la grille) --------- // Variables mémorisants les anciens effets @@ -473,8 +477,6 @@ void Deplacer_Split(void) void Gestion_principale(void) { static byte Temp_color; - static short Old_MX=0; - static short Old_MY=0; int Indice_bouton; // Numéro de bouton de menu en cours int Indice_bouton_precedent=0; // Numéro de bouton de menu sur lequel on était précédemment byte Blink; // L'opération demande un effacement du curseur @@ -947,12 +949,15 @@ void Gestion_principale(void) else if (Loupe_Mode) Deplacer_Split(); } + + Old_MX=Mouse_X; + Old_MY=Mouse_Y; + } else { // Le curseur se trouve dans l'image - - if ( (Curseur_dans_menu_precedent) && (Menu_visible) && Old_MY!=Mouse_Y && Old_MX != Mouse_X) // On ne met les coordonnées à jour que si la souris a bougé. Problème, ça va merder si on scroll l'écran... + if ( (Curseur_dans_menu_precedent) && (Menu_visible) && (Old_MY != Mouse_Y || Old_MX != Mouse_X)) // On ne met les coordonnées à jour que si la souris a bougé. Problème, ça va merder si on scroll l'écran... { if ( (Operation_en_cours!=OPERATION_PIPETTE) && (Operation_en_cours!=OPERATION_REMPLACER) ) @@ -1115,6 +1120,9 @@ void Fermer_fenetre(void) Touche=0; Mouse_K=0; + + Old_MX = -1; + Old_MY = -1; Fenetre--; diff --git a/windows.h b/windows.h index 3b28f9ad..85a46e85 100644 --- a/windows.h +++ b/windows.h @@ -19,8 +19,8 @@ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef __WINDOWSH__ -#define __WINDOWSH__ +#ifndef __WINDOWS_H_ +#define __WINDOWS_H_ #include "struct.h"