Fix crash when using Magnifier shortcut while the mouse is on a layer button (issue 480)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1932 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
		
							parent
							
								
									be96447f3b
								
							
						
					
					
						commit
						30e8079236
					
				
							
								
								
									
										23
									
								
								src/engine.c
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								src/engine.c
									
									
									
									
									
								
							@ -691,6 +691,13 @@ void Main_handler(void)
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
          if (Is_shortcut(Key,key_index))
 | 
					          if (Is_shortcut(Key,key_index))
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
 | 
					            if (preview_is_visible)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
								  int x = Mouse_K;
 | 
				
			||||||
 | 
								  Close_popup();
 | 
				
			||||||
 | 
								  Mouse_K = x; // Close_popup waits for end of click and resets Mouse_K...
 | 
				
			||||||
 | 
								  preview_is_visible = 0;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
            // Special keys (functions not hooked to a UI button)
 | 
					            // Special keys (functions not hooked to a UI button)
 | 
				
			||||||
            switch(key_index)
 | 
					            switch(key_index)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
@ -1308,13 +1315,27 @@ void Main_handler(void)
 | 
				
			|||||||
          for (button_index=0;button_index<NB_BUTTONS;button_index++)
 | 
					          for (button_index=0;button_index<NB_BUTTONS;button_index++)
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            if (Is_shortcut(key_pressed,0x100+button_index))
 | 
					            if (Is_shortcut(key_pressed,0x100+button_index))
 | 
				
			||||||
            {          
 | 
					            {
 | 
				
			||||||
 | 
					              if (preview_is_visible)
 | 
				
			||||||
 | 
					              {
 | 
				
			||||||
 | 
									int x = Mouse_K;
 | 
				
			||||||
 | 
									Close_popup();
 | 
				
			||||||
 | 
									Mouse_K = x; // Close_popup waits for end of click and resets Mouse_K...
 | 
				
			||||||
 | 
									preview_is_visible = 0;
 | 
				
			||||||
 | 
								  }
 | 
				
			||||||
              Select_button(button_index,LEFT_SIDE);
 | 
					              Select_button(button_index,LEFT_SIDE);
 | 
				
			||||||
              prev_button_number=-1;
 | 
					              prev_button_number=-1;
 | 
				
			||||||
              action++;
 | 
					              action++;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            else if (Is_shortcut(key_pressed,0x200+button_index))
 | 
					            else if (Is_shortcut(key_pressed,0x200+button_index))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
 | 
					              if (preview_is_visible)
 | 
				
			||||||
 | 
					              {
 | 
				
			||||||
 | 
									int x = Mouse_K;
 | 
				
			||||||
 | 
									Close_popup();
 | 
				
			||||||
 | 
									Mouse_K = x; // Close_popup waits for end of click and resets Mouse_K...
 | 
				
			||||||
 | 
									preview_is_visible = 0;
 | 
				
			||||||
 | 
								  }
 | 
				
			||||||
              Select_button(button_index,RIGHT_SIDE);
 | 
					              Select_button(button_index,RIGHT_SIDE);
 | 
				
			||||||
              prev_button_number=-1;
 | 
					              prev_button_number=-1;
 | 
				
			||||||
              action++;
 | 
					              action++;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user