EgtMachKernel :

- correzioni al disegno utensili.
This commit is contained in:
Dario Sassi
2019-05-18 16:15:46 +00:00
parent 7a451b3e3f
commit c2956b2733
+6 -3
View File
@@ -262,6 +262,9 @@ MachMgr::TdbGetCurrToolMaxDepth( double& dMaxDepth) const
int
MachMgr::TdbCurrToolDraw( int nGenCtx, int nToolCtx) const
{
// imposto contesto generale
if ( ! ExeSetCurrentContext( nGenCtx))
return TD_INT_ERR ;
// recupero il gestore di utensili della macchina corrente
ToolsMgr* pTsMgr = GetCurrToolsMgr() ;
if ( pTsMgr == nullptr)
@@ -290,10 +293,10 @@ MachMgr::TdbCurrToolDraw( int nGenCtx, int nToolCtx) const
// altrimenti è disegno custom, lo modifico
else {
// Carico e aggiorno il disegno dell'utensile
if ( ExeOpenFile( sDrawPath))
if ( ExeSetCurrentContext( nToolCtx) && ExeOpenFile( sDrawPath))
nErr = UpdateCustomToolDraw( pTdata, nGenCtx, nToolCtx, false) ;
else
nErr = TD_INT_ERR ;
nErr = TD_CUSTOMDRAW_ERR ;
}
return nErr ;
}
@@ -488,7 +491,7 @@ MachMgr::UpdateStandardToolDraw( const ToolData* pTdata, int nGenCtx, int nToolC
// Carico generatore disegno utensile
string sMaker = GetPrivateProfileStringUtf8( TOOLS_SEC.c_str(), GetToolMakerKeyFromType( nType).c_str(), "", sMachIni.c_str()) ;
if ( sMaker.empty())
return TD_INT_ERR ;
return TD_TOOLMAKER_ERR ;
// Imposto contesto per il disegno utensile
if ( ! ExeSetCurrentContext( nToolCtx))
return TD_INT_ERR ;