Unify Eeschema orient commands and other minor fixes.

* Create command event handler for orienting schematic items and block.
* Remove redundant orient item and block command handler code and IDs.
* Remove redundant cancel current command event table entry.
* Remove unnecessary schematic bitmap object virtual functions.
* Set path when saving schematic sheet files to prevent assertion in
  updated path and file write permission test function.
* Restore directory and file name write permission test function to it's
  previous behavior to prevent unexpected save results.
* Add an assertion to verify the path is not empty to directory and file
  write permission test function.
* Improve documentation for path and file write permission test function.
* Fix Doxygen link warnings.
This commit is contained in:
Wayne Stambaugh
2011-10-28 16:30:50 -04:00
parent a834c47be5
commit bbda48f9e8
14 changed files with 206 additions and 212 deletions
+8 -12
View File
@@ -543,25 +543,21 @@ bool EDA_BASE_FRAME::IsWritable( const wxFileName& aFileName )
{
wxString msg;
wxCHECK_MSG( aFileName.IsOk(), false, wxT( "Invalid file name object. Bad programmer!" ) );
wxCHECK_MSG( aFileName.IsOk(), false,
wxT( "File name object is invalid. Bad programmer!" ) );
wxCHECK_MSG( !aFileName.GetPath().IsEmpty(), false,
wxT( "File name object path <" ) + aFileName.GetFullPath() +
wxT( "> is not set. Bad programmer!" ) );
if( aFileName.IsDir() && !aFileName.IsDirWritable() )
{
msg.Printf( _( "You do not have write permissions to folder <%s>." ),
GetChars( aFileName.GetPath() ) );
}
else if( !aFileName.FileExists() )
else if( !aFileName.FileExists() && !aFileName.IsDirWritable() )
{
// Extract filename path, and if void, uses the CWD
// because IsDirWritable does not like void path
wxString filedir = aFileName.GetPath();
if( filedir.IsEmpty() )
filedir = wxGetCwd();
if( !aFileName.IsDirWritable(filedir) )
{
msg.Printf( _( "You do not have write permissions to save file <%s> to folder <%s>." ),
GetChars( aFileName.GetFullName() ), GetChars( filedir ) );
}
msg.Printf( _( "You do not have write permissions to save file <%s> to folder <%s>." ),
GetChars( aFileName.GetFullName() ), GetChars( aFileName.GetPath() ) );
}
else if( aFileName.FileExists() && !aFileName.IsFileWritable() )
{