Don't set dirty bit when adding MARKERs.
They're not saved in the file, so they shouldn't dirty it. Fixes: lp:1762497 * https://bugs.launchpad.net/kicad/+bug/1762497
This commit is contained in:
parent
cb134fd065
commit
84151990cd
|
@ -130,7 +130,8 @@ public:
|
||||||
COMMIT& Stage( const PICKED_ITEMS_LIST& aItems, UNDO_REDO_T aModFlag = UR_UNSPECIFIED );
|
COMMIT& Stage( const PICKED_ITEMS_LIST& aItems, UNDO_REDO_T aModFlag = UR_UNSPECIFIED );
|
||||||
|
|
||||||
///> Executes the changes.
|
///> Executes the changes.
|
||||||
virtual void Push( const wxString& aMessage = wxT( "A commit" ), bool aCreateUndoEntry = true ) = 0;
|
virtual void Push( const wxString& aMessage = wxT( "A commit" ),
|
||||||
|
bool aCreateUndoEntry = true, bool aSetDirtyBit = true ) = 0;
|
||||||
|
|
||||||
///> Revertes the commit by restoring the modifed items state.
|
///> Revertes the commit by restoring the modifed items state.
|
||||||
virtual void Revert() = 0;
|
virtual void Revert() = 0;
|
||||||
|
|
|
@ -56,7 +56,7 @@ BOARD_COMMIT::~BOARD_COMMIT()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry )
|
void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry, bool aSetDirtyBit )
|
||||||
{
|
{
|
||||||
// Objects potentially interested in changes:
|
// Objects potentially interested in changes:
|
||||||
PICKED_ITEMS_LIST undoList;
|
PICKED_ITEMS_LIST undoList;
|
||||||
|
@ -283,7 +283,9 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry )
|
||||||
panel->RedrawRatsnest();
|
panel->RedrawRatsnest();
|
||||||
}
|
}
|
||||||
|
|
||||||
frame->OnModify();
|
if( aSetDirtyBit )
|
||||||
|
frame->OnModify();
|
||||||
|
|
||||||
frame->UpdateMsgPanel();
|
frame->UpdateMsgPanel();
|
||||||
|
|
||||||
clear();
|
clear();
|
||||||
|
|
|
@ -42,7 +42,9 @@ public:
|
||||||
|
|
||||||
virtual ~BOARD_COMMIT();
|
virtual ~BOARD_COMMIT();
|
||||||
|
|
||||||
virtual void Push( const wxString& aMessage = wxT( "A commit" ), bool aCreateUndoEntry = true ) override;
|
virtual void Push( const wxString& aMessage = wxT( "A commit" ),
|
||||||
|
bool aCreateUndoEntry = true, bool aSetDirtyBit = true ) override;
|
||||||
|
|
||||||
virtual void Revert() override;
|
virtual void Revert() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -99,7 +99,7 @@ void DRC::addMarkerToPcb( MARKER_PCB* aMarker )
|
||||||
{
|
{
|
||||||
BOARD_COMMIT commit( m_pcbEditorFrame );
|
BOARD_COMMIT commit( m_pcbEditorFrame );
|
||||||
commit.Add( aMarker );
|
commit.Add( aMarker );
|
||||||
commit.Push( wxEmptyString, false );
|
commit.Push( wxEmptyString, false, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -339,7 +339,7 @@ int DRC::TestZoneToZoneOutline( ZONE_CONTAINER* aZone, bool aCreateMarkers )
|
||||||
}
|
}
|
||||||
|
|
||||||
if( aCreateMarkers )
|
if( aCreateMarkers )
|
||||||
commit.Push( wxEmptyString, false );
|
commit.Push( wxEmptyString, false, false );
|
||||||
|
|
||||||
return nerrors;
|
return nerrors;
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,7 +152,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads )
|
||||||
for( auto marker : markers )
|
for( auto marker : markers )
|
||||||
commit.Add( marker );
|
commit.Add( marker );
|
||||||
|
|
||||||
commit.Push( wxEmptyString, false );
|
commit.Push( wxEmptyString, false, false );
|
||||||
};
|
};
|
||||||
|
|
||||||
// Returns false if we should return false from call site, or true to continue
|
// Returns false if we should return false from call site, or true to continue
|
||||||
|
|
Loading…
Reference in New Issue