TestEgr :

- piccoli miglioramenti.
This commit is contained in:
Dario Sassi
2014-09-20 22:09:33 +00:00
parent bd41a4e01d
commit 61dea6c98e
2 changed files with 19 additions and 11 deletions
+8 -1
View File
@@ -75,11 +75,18 @@ CTestEGrDlg::ClearTree( void)
// ripristino stato eventuale ultimo oggetto selezionato
RevertOldIdInTree() ;
// disabilito aggiornamento
m_Tree.SetRedraw( FALSE) ;
// svuoto l'albero
m_Tree.SelectItem( NULL) ;
m_Tree.DeleteAllItems() ;
OutData( "") ;
// riabilito aggiornamento
m_Tree.SetRedraw( TRUE) ;
m_Tree.Invalidate() ;
return true ;
}
@@ -154,7 +161,7 @@ CTestEGrDlg::InsertGroupInTree( int nId, HTREEITEM hParent)
// Se troppi figli, non li visualizzo
int nObjs = m_pGeomDB->GetGroupObjs( nId) ;
if ( nObjs > 16000) {
if ( nObjs > 20000) {
string sInfo = sGroup + " Too many objects ..." ;
m_Tree.SetItemText( hGroup, stringtoW( sInfo)) ;
return true ;
+11 -10
View File
@@ -1213,6 +1213,7 @@ CTestEGrDlg::FileImport( const string& sFilePath)
ClearTree() ;
// reinizializzazione (con pulizia) del DB geometrico
PrepareGeomDB() ;
bool bOk = true ;
// importo il file CNC
if ( sFileExt == "CNC") {
// aggiungo un gruppo pezzo
@@ -1221,12 +1222,12 @@ CTestEGrDlg::FileImport( const string& sFilePath)
PtrOwner<IImportCnc> pImpCnc( CreateImportCnc()) ;
if ( IsNull( pImpCnc)) {
LOG_ERROR( m_pLogGen, "Error : CreateImportCnc")
return false ;
bOk = false ;
}
// eseguo l'importazione
if ( ! pImpCnc->Import( sFilePath, m_pGeomDB, nPartId)) {
else if ( ! pImpCnc->Import( sFilePath, m_pGeomDB, nPartId)) {
LoadTree() ;
return false ;
bOk = false ;
}
// log dei comandi
LOG_INFO( m_pLogCmd, "RESET( $P1)")
@@ -1241,12 +1242,12 @@ CTestEGrDlg::FileImport( const string& sFilePath)
PtrOwner<IImportDxf> pImpDxf( CreateImportDxf()) ;
if ( IsNull( pImpDxf)) {
LOG_ERROR( m_pLogGen, "Error : CreateImportDxf")
return false ;
bOk = false ;
}
// eseguo l'importazione
if ( ! pImpDxf->Import( sFilePath, m_pGeomDB, nPartId)) {
else if ( ! pImpDxf->Import( sFilePath, m_pGeomDB, nPartId)) {
LoadTree() ;
return false ;
bOk = false ;
}
// log dei comandi
LOG_INFO( m_pLogCmd, "RESET( $P1)")
@@ -1262,12 +1263,12 @@ CTestEGrDlg::FileImport( const string& sFilePath)
PtrOwner<IImportStl> pImpStl( CreateImportStl()) ;
if ( IsNull( pImpStl)) {
LOG_ERROR( m_pLogGen, "Error : CreateImportStl")
return false ;
bOk = false ;
}
// eseguo l'importazione
if ( ! pImpStl->Import( sFilePath, m_pGeomDB, nLayerId)) {
else if ( ! pImpStl->Import( sFilePath, m_pGeomDB, nLayerId)) {
LoadTree() ;
return false ;
bOk = false ;
}
// log dei comandi
LOG_INFO( m_pLogCmd, "RESET( ($P1, $L1))")
@@ -1287,7 +1288,7 @@ CTestEGrDlg::FileImport( const string& sFilePath)
// aggiorno l'albero delle entità
LoadTree() ;
return true ;
return bOk ;
}
//----------------------------------------------------------------------------