Add SCH_RULE_AREA shapes to eeschema
Includes: - Fix GAL to draw closed polygons in eeschema - Add functionality to eeschema to draw arbitary polygons - Update polygon item previews to have customisable edge colour - Add new SCH_RULE_AREA class, derived from a poly SCH_SHAPE - Add SCH_RULE_AREA to paint and plot methods - Add new rule area color preference to themes
This commit is contained in:
+17
-15
@@ -221,22 +221,21 @@ void SCH_COMMIT::pushSchEdit( const wxString& aMessage, int aCommitFlags )
|
||||
} );
|
||||
}
|
||||
|
||||
auto updateConnectivityFlag =
|
||||
[&]()
|
||||
{
|
||||
if( schItem->IsConnectable() )
|
||||
{
|
||||
dirtyConnectivity = true;
|
||||
auto updateConnectivityFlag = [&]()
|
||||
{
|
||||
if( schItem->IsConnectable() || ( schItem->Type() == SCH_RULE_AREA_T ) )
|
||||
{
|
||||
dirtyConnectivity = true;
|
||||
|
||||
// Do a local clean up if there are any connectable objects in the commit.
|
||||
if( connectivityCleanUp == NO_CLEANUP )
|
||||
connectivityCleanUp = LOCAL_CLEANUP;
|
||||
// Do a local clean up if there are any connectable objects in the commit.
|
||||
if( connectivityCleanUp == NO_CLEANUP )
|
||||
connectivityCleanUp = LOCAL_CLEANUP;
|
||||
|
||||
// Do a full rebauild of the connectivity if there is a sheet in the commit.
|
||||
if( schItem->Type() == SCH_SHEET_T )
|
||||
connectivityCleanUp = GLOBAL_CLEANUP;
|
||||
}
|
||||
};
|
||||
// Do a full rebauild of the connectivity if there is a sheet in the commit.
|
||||
if( schItem->Type() == SCH_SHEET_T )
|
||||
connectivityCleanUp = GLOBAL_CLEANUP;
|
||||
}
|
||||
};
|
||||
|
||||
switch( changeType )
|
||||
{
|
||||
@@ -318,8 +317,11 @@ void SCH_COMMIT::pushSchEdit( const wxString& aMessage, int aCommitFlags )
|
||||
if( frame )
|
||||
currentSheet = frame->GetCurrentSheet();
|
||||
|
||||
if( itemCopy->HasConnectivityChanges( schItem, ¤tSheet ) )
|
||||
if( itemCopy->HasConnectivityChanges( schItem, ¤tSheet )
|
||||
|| ( itemCopy->Type() == SCH_RULE_AREA_T ) )
|
||||
{
|
||||
updateConnectivityFlag();
|
||||
}
|
||||
|
||||
undoList.PushItem( itemWrapper );
|
||||
ent.m_copy = nullptr; // We've transferred ownership to the undo list
|
||||
|
||||
Reference in New Issue
Block a user