From 1813f008f41be0eaa393df6b1f3bf7c27571a23f Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 15 Jul 2019 06:55:50 +0000 Subject: [PATCH] EgtExecutor 2.1g2 : - in Estimate aggiunta gestione nome file vuoto (simile a Generate). --- EXE_MachMgr.cpp | 20 +++++++++++++++++++- EgtExecutor.rc | Bin 16176 -> 16176 bytes 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/EXE_MachMgr.cpp b/EXE_MachMgr.cpp index 87e0e72..a4238f2 100644 --- a/EXE_MachMgr.cpp +++ b/EXE_MachMgr.cpp @@ -2710,8 +2710,26 @@ ExeEstimate( const string& sEstFile, const string& sInfo) { IMachMgr* pMachMgr = GetCurrMachMgr() ; VERIFY_MACHMGR( pMachMgr, false) + string sMyEstFile = sEstFile ; + // se nome file vuoto + if ( IsEmptyOrSpaces( sMyEstFile)) { + // recupero la path del progetto + string sProjPath ; + if ( ! ExeGetCurrFilePath( sProjPath)) + return false ; + // ne deduco il direttorio + string sDir = GetDirectory( sProjPath) ; + ReplaceString( sDir, "/", "\\") ; + // recupero il nome + string sEstName ; + if ( ! ExeGetInfo( ExeGetCurrMachGroup(), GDL_NC_NAME, sEstName)) + sEstName = GetFileTitleEgt( sProjPath) ; + sEstName = ChangeFileExtension( sEstName, ".html") ; + // creo la path completa + sMyEstFile = sDir + "\\" + sEstName ; + } // eseguo la stima di tempi e lunghezze di lavoro della macchinata corrente - return pMachMgr->Estimate( sEstFile, sInfo) ; + return pMachMgr->Estimate( sMyEstFile, sInfo) ; } //----------------------------------------------------------------------------- diff --git a/EgtExecutor.rc b/EgtExecutor.rc index 1d35906f1f29226c638dcf48ea225e1239abc305..2807d4bff2a088de878dfbc785020c9c8faa4d59 100644 GIT binary patch delta 103 zcmdl`x1nysH#Syt1|0^Y&A-{4nVHjp3`efTEO4>oOp`YVR)EAOJ8~s&?h~?r$(psNd^E|p&o+( delta 103 zcmdl`x1nysH#Sx?1|0_D&A-{4nVHjo3`efTEO4>oOp`YVR)EAOJ8~s&?h~?r$(psNd^E|i5`Oh