Commit aa5e1cd0 authored by lifekidyeaa's avatar lifekidyeaa
Browse files

* backspace should not be allowed to delete modules (in order to

re-insert them, you may have to edit the .brd file directly)
parent 3c7846db
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -1365,6 +1365,7 @@ void WinEDA_PcbFrame::SwitchLayer(wxDC *DC, int layer)
				Other_Layer_Route( (TRACK *) GetScreen()->m_CurrentItem, DC);
				Other_Layer_Route( (TRACK *) GetScreen()->m_CurrentItem, DC);
			}
			}
		}
		}
		
		GetScreen()->m_Active_Layer = layer; 
		GetScreen()->m_Active_Layer = layer; 
	
	
		if ( DisplayOpt.ContrastModeDisplay )
		if ( DisplayOpt.ContrastModeDisplay )
+5 −2
Original line number Original line Diff line number Diff line
@@ -54,7 +54,9 @@ MODULE* module = NULL;
				if ( ItemFree ){
				if ( ItemFree ){
					//no track is currently being edited - select a segment and remove it.
					//no track is currently being edited - select a segment and remove it.
					DrawStruct = PcbGeneralLocateAndDisplay();
					DrawStruct = PcbGeneralLocateAndDisplay();
					if ( DrawStruct )
					//don't let backspace delete modules!!
					if ( DrawStruct && (DrawStruct->m_StructType == TYPETRACK
										|| DrawStruct->m_StructType == TYPEVIA))
						Delete_Segment(DC, (TRACK*)DrawStruct);
						Delete_Segment(DC, (TRACK*)DrawStruct);
					GetScreen()->SetModify();
					GetScreen()->SetModify();
				}
				}
@@ -217,6 +219,7 @@ bool ItemFree = (GetScreen()->m_CurrentItem == NULL ) ||
			{
			{
			MODULE * module = Locate_Prefered_Module(m_Pcb, CURSEUR_ON_GRILLE);
			MODULE * module = Locate_Prefered_Module(m_Pcb, CURSEUR_ON_GRILLE);
				if ( module == NULL ) return FALSE;
				if ( module == NULL ) return FALSE;
				if( ! IsOK(this, _("Delete module?")) ) return FALSE;
				RemoveStruct(module, DC);
				RemoveStruct(module, DC);
			}
			}
			else return FALSE;
			else return FALSE;