EgtMachKernel 1.8b7 :

- corretta gestione disposizioni con spostamento pezzi consecutive e con teste diverse
- aggiunta GetRotAxisBlocked
- aggiunto controllo validità nome su utensili.
This commit is contained in:
Dario Sassi
2017-03-02 07:56:39 +00:00
parent 0941600e08
commit 284525c926
8 changed files with 63 additions and 8 deletions
+9 -1
View File
@@ -333,6 +333,9 @@ ToolsMgr::GetToolNewName( string& sName) const
bool
ToolsMgr::AddTool( const string& sName, int nType)
{
// verifico validità del nome
if ( ! IsValidName( sName))
return false ;
// verifico unicità del nome
if ( m_suData.find( sName) != m_suData.end())
return false ;
@@ -359,6 +362,9 @@ ToolsMgr::AddTool( const string& sName, int nType)
bool
ToolsMgr::CopyTool( const string& sSource, const string& sName)
{
// verifico validità del nome
if ( ! IsValidName( sName))
return false ;
// verifico unicità del nome
if ( m_suData.find( sName) != m_suData.end())
return false ;
@@ -568,8 +574,10 @@ ToolsMgr::SetCurrToolParam( int nType, const string& sVal)
// non è possibile cambiare UUID
if ( nType == TPA_UUID)
return false ;
// è possibile cambiare il nome, solo se il nuovo non è già presente nel DB (escluso utensile corrente)
// è possibile cambiare il nome, solo se il nuovo è valido e non è già presente nel DB (escluso utensile corrente)
if ( nType == TPA_NAME) {
if ( ! IsValidName( sVal))
return false ;
const ToolData* pTdata = GetTool( sVal) ;
if ( pTdata != nullptr && pTdata->m_Uuid != m_tdCurrTool.m_Uuid)
return false ;