TestEgr :
- piccoli miglioramenti.
This commit is contained in:
+8
-1
@@ -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
@@ -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 ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user