Eeschema: fix overzealous save file update UI event handler.
Apparently wxFileName stats the file on Windows when using the == operator which causes slow response when adding sheets in designs saved on remote shares. Fixes https://gitlab.com/kicad/code/kicad/-/issues/5596
This commit is contained in:
parent
276cb7590d
commit
b532c4a2b8
|
@ -813,9 +813,9 @@ void SCH_EDIT_FRAME::OnUpdateHiddenPins( wxUpdateUIEvent& aEvent )
|
||||||
|
|
||||||
void SCH_EDIT_FRAME::OnUpdateSave( wxUpdateUIEvent& aEvent )
|
void SCH_EDIT_FRAME::OnUpdateSave( wxUpdateUIEvent& aEvent )
|
||||||
{
|
{
|
||||||
SCH_SHEET_LIST sheetList( g_RootSheet );
|
SCH_SCREENS screenList( g_RootSheet );
|
||||||
|
|
||||||
aEvent.Enable( sheetList.IsModified() );
|
aEvent.Enable( screenList.IsModified() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1668,3 +1668,17 @@ void SCH_SCREENS::BuildClientSheetPathList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool SCH_SCREENS::IsModified() const
|
||||||
|
{
|
||||||
|
for( const SCH_SCREEN* screen : m_screens )
|
||||||
|
{
|
||||||
|
if( screen->IsModify() )
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -652,6 +652,13 @@ public:
|
||||||
*/
|
*/
|
||||||
bool CanCauseCaseSensitivityIssue( const wxString& aSchematicFileName ) const;
|
bool CanCauseCaseSensitivityIssue( const wxString& aSchematicFileName ) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if this screen list has any modified screens.
|
||||||
|
*
|
||||||
|
* @return true if there are any modified screens in this list.
|
||||||
|
*/
|
||||||
|
bool IsModified() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void addScreenToList( SCH_SCREEN* aScreen );
|
void addScreenToList( SCH_SCREEN* aScreen );
|
||||||
void buildScreenList( SCH_SHEET* aSheet);
|
void buildScreenList( SCH_SHEET* aSheet);
|
||||||
|
|
Loading…
Reference in New Issue