EgtMachKernel :
- correzioni al disegno utensili.
This commit is contained in:
+6
-3
@@ -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 ;
|
||||
|
||||
Reference in New Issue
Block a user