@ -1854,12 +1854,15 @@ void UBDocumentController::selectDocument(UBDocumentProxy* proxy, bool setAsCurr
if ( setAsCurrentDocument ) {
if ( setAsCurrentDocument ) {
UBPersistenceManager : : persistenceManager ( ) - > mDocumentTreeStructureModel - > setCurrentDocument ( proxy ) ;
UBPersistenceManager : : persistenceManager ( ) - > mDocumentTreeStructureModel - > setCurrentDocument ( proxy ) ;
QModelIndex indexCurrentDoc = UBPersistenceManager : : persistenceManager ( ) - > mDocumentTreeStructureModel - > indexForProxy ( proxy ) ;
QModelIndex indexCurrentDoc = UBPersistenceManager : : persistenceManager ( ) - > mDocumentTreeStructureModel - > indexForProxy ( proxy ) ;
mDocumentUI - > documentTreeView - > setSelectedAndExpanded ( indexCurrentDoc , true , editMode ) ;
if ( indexCurrentDoc . isValid ( ) )
if ( proxy ! = mBoardController - > selectedDocument ( ) ) // only if wanted Document is different from document actually on Board, // ALTI/AOU - 20140217
{
{
//issue 1629 - NNE - 20131105 : When set a current document, change in the board controller
mDocumentUI - > documentTreeView - > setSelectedAndExpanded ( indexCurrentDoc , true , editMode ) ;
mBoardController - > setActiveDocumentScene ( proxy , 0 , true , onImport ) ;
if ( proxy ! = mBoardController - > selectedDocument ( ) ) // only if wanted Document is different from document actually on Board, // ALTI/AOU - 20140217
{
//issue 1629 - NNE - 20131105 : When set a current document, change in the board controller
mBoardController - > setActiveDocumentScene ( proxy , 0 , true , onImport ) ;
}
}
}
}
}