Merge relevant changes from V8_0_0_BR branch

This commit is contained in:
vsr 2016-02-12 09:32:57 +03:00
parent e1b9f3df7a
commit 971a1433b3
9 changed files with 53 additions and 51 deletions

View File

@ -78,29 +78,31 @@ ENDIF()
# For all prerequisites, load the corresponding targets if the package was used # For all prerequisites, load the corresponding targets if the package was used
# in CONFIG mode. This ensures dependent projects link correctly # in CONFIG mode. This ensures dependent projects link correctly
# without having to set LD_LIBRARY_PATH: # without having to set LD_LIBRARY_PATH:
SET(_PREREQ @_PREREQ_LIST@) SET(_PREREQ_@PROJECT_NAME@ @_PREREQ_LIST@)
SET(_PREREQ_CONFIG_DIR @_PREREQ_DIR_LIST@) SET(_PREREQ_@PROJECT_NAME@_CONFIG_DIR @_PREREQ_DIR_LIST@)
SET(_PREREQ_COMPONENTS "@_PREREQ_COMPO_LIST@") SET(_PREREQ_@PROJECT_NAME@_COMPONENTS "@_PREREQ_COMPO_LIST@")
LIST(LENGTH _PREREQ_CONFIG_DIR _list_len) LIST(LENGTH _PREREQ_@PROJECT_NAME@_CONFIG_DIR _list_len_@PROJECT_NAME@)
IF(NOT _list_len EQUAL 0) IF(NOT _list_len_@PROJECT_NAME@ EQUAL 0)
# Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ... # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
MATH(EXPR _range "${_list_len}-1") MATH(EXPR _range_@PROJECT_NAME@ "${_list_len_@PROJECT_NAME@}-1")
FOREACH(_p RANGE ${_range}) FOREACH(_p_@PROJECT_NAME@ RANGE ${_range_@PROJECT_NAME@})
LIST(GET _PREREQ ${_p} _pkg ) LIST(GET _PREREQ_@PROJECT_NAME@ ${_p_@PROJECT_NAME@} _pkg_@PROJECT_NAME@ )
LIST(GET _PREREQ_CONFIG_DIR ${_p} _pkg_dir) LIST(GET _PREREQ_@PROJECT_NAME@_CONFIG_DIR ${_p_@PROJECT_NAME@} _pkg_dir_@PROJECT_NAME@)
LIST(GET _PREREQ_COMPONENTS ${_p} _pkg_compo) LIST(GET _PREREQ_@PROJECT_NAME@_COMPONENTS ${_p_@PROJECT_NAME@} _pkg_compo_@PROJECT_NAME@)
MESSAGE(STATUS "===> Reloading targets from ${_pkg} ...") IF(NOT OMIT_DETECT_PACKAGE_${_pkg_@PROJECT_NAME@})
IF(NOT _pkg_compo) MESSAGE(STATUS "===> Reloading targets from ${_pkg_@PROJECT_NAME@} ...")
FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE IF(NOT _pkg_compo_@PROJECT_NAME@)
PATHS "${_pkg_dir}" FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
NO_DEFAULT_PATH) PATHS "${_pkg_dir_@PROJECT_NAME@}"
ELSE() NO_DEFAULT_PATH)
STRING(REPLACE "," ";" _compo_lst "${_pkg_compo}") ELSE()
MESSAGE(STATUS "===> (components: ${_pkg_compo})") STRING(REPLACE "," ";" _compo_lst_@PROJECT_NAME@ "${_pkg_compo_@PROJECT_NAME@}")
FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE MESSAGE(STATUS "===> (components: ${_pkg_compo_@PROJECT_NAME@})")
COMPONENTS ${_compo_lst} FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
PATHS "${_pkg_dir}" COMPONENTS ${_compo_lst_@PROJECT_NAME@}
NO_DEFAULT_PATH) PATHS "${_pkg_dir_@PROJECT_NAME@}"
NO_DEFAULT_PATH)
ENDIF()
ENDIF() ENDIF()
ENDFOREACH() ENDFOREACH()
ENDIF() ENDIF()

View File

@ -1733,7 +1733,7 @@ void SMESHGUI_PrecomputeOp::initDialog()
myOrderMgr = new SMESHGUI_MeshOrderMgr( myDlg->getMeshOrderBox() ); myOrderMgr = new SMESHGUI_MeshOrderMgr( myDlg->getMeshOrderBox() );
myOrderMgr->SetMesh( myMesh ); myOrderMgr->SetMesh( myMesh );
bool isOrder = myOrderMgr->GetMeshOrder(myPrevOrder); bool isOrder = myOrderMgr->GetMeshOrder(myPrevOrder);
myDlg->getMeshOrderBox()->setShown(isOrder); myDlg->getMeshOrderBox()->setVisible(isOrder);
if ( !isOrder ) { if ( !isOrder ) {
delete myOrderMgr; delete myOrderMgr;
myOrderMgr = 0; myOrderMgr = 0;

View File

@ -378,7 +378,7 @@ void SMESHGUI_CreatePatternDlg::onSave()
SUIT_FileDlg* aDlg = new SUIT_FileDlg( this, false ); SUIT_FileDlg* aDlg = new SUIT_FileDlg( this, false );
aDlg->setWindowTitle( tr( "SAVE_PATTERN" ) ); aDlg->setWindowTitle( tr( "SAVE_PATTERN" ) );
aDlg->setFileMode( QFileDialog::AnyFile ); aDlg->setFileMode( QFileDialog::AnyFile );
aDlg->setFilter( tr( "PATTERN_FILT" ) ); aDlg->setNameFilter( tr( "PATTERN_FILT" ) );
if ( myName->text() != "" ) if ( myName->text() != "" )
aDlg->selectFile( myName->text() ); aDlg->selectFile( myName->text() );
@ -392,7 +392,7 @@ void SMESHGUI_CreatePatternDlg::onSave()
if ( QFileInfo( fName ).suffix().isEmpty() ) if ( QFileInfo( fName ).suffix().isEmpty() )
fName = autoExtension( fName ); fName = autoExtension( fName );
fName = QDir::convertSeparators( fName ); fName = QDir::toNativeSeparators( fName );
QString aData( myPattern->GetString() ); QString aData( myPattern->GetString() );
long aLen = aData.length(); long aLen = aData.length();

View File

@ -611,7 +611,7 @@ void SMESHGUI_FilterLibraryDlg::onBrowse()
//aDlg->setMode(myMode == COPY_FROM ? QFileDialogP::ExistingFile : QFileDialogP::AnyFile); //aDlg->setMode(myMode == COPY_FROM ? QFileDialogP::ExistingFile : QFileDialogP::AnyFile);
aDlg->setFileMode(myMode == COPY_FROM ? QFileDialog::ExistingFile : QFileDialog::AnyFile); aDlg->setFileMode(myMode == COPY_FROM ? QFileDialog::ExistingFile : QFileDialog::AnyFile);
aDlg->setFilters(prepareFilters()); aDlg->setNameFilters(prepareFilters());
aDlg->selectFile(getFileName()); aDlg->selectFile(getFileName());
QPushButton* anOkBtn = (QPushButton*)aDlg->findChild<QPushButton*>("OK"); QPushButton* anOkBtn = (QPushButton*)aDlg->findChild<QPushButton*>("OK");
@ -629,8 +629,8 @@ void SMESHGUI_FilterLibraryDlg::onBrowse()
if (QFileInfo(fName).suffix().isEmpty()) if (QFileInfo(fName).suffix().isEmpty())
fName = autoExtension(fName); fName = autoExtension(fName);
fName = QDir::convertSeparators(fName); fName = QDir::toNativeSeparators(fName);
QString prev = QDir::convertSeparators(getFileName()); QString prev = QDir::toNativeSeparators(getFileName());
if (prev == fName) if (prev == fName)
return; return;
@ -756,7 +756,7 @@ bool SMESHGUI_FilterLibraryDlg::isPermissionValid(const bool theIsExistingOnly)
if (QFileInfo(fName).suffix().isEmpty()) if (QFileInfo(fName).suffix().isEmpty())
fName = autoExtension(fName); fName = autoExtension(fName);
fName = QDir::convertSeparators(fName); fName = QDir::toNativeSeparators(fName);
if (QFileInfo(fName).exists()) { if (QFileInfo(fName).exists()) {
isWritable = QFileInfo(fName).isWritable(); isWritable = QFileInfo(fName).isWritable();

View File

@ -102,7 +102,7 @@ QPixmap SMESHGUI_MergeDlg::IconFirst()
" .. ... ... ", " .. ... ... ",
" .. .. .. ", " .. .. .. ",
" . . "}; " . . "};
return iconFirst; return QPixmap( iconFirst );
} }
//================================================================================= //=================================================================================

View File

@ -3147,7 +3147,7 @@ void SMESHGUI_MeshInfoDlg::dump()
DumpFileDlg fd( this ); DumpFileDlg fd( this );
fd.setWindowTitle( tr( "SAVE_INFO" ) ); fd.setWindowTitle( tr( "SAVE_INFO" ) );
fd.setFilters( aFilters ); fd.setNameFilters( aFilters );
fd.myBaseChk->setChecked( anIsBase ); fd.myBaseChk->setChecked( anIsBase );
fd.myElemChk->setChecked( anIsElem ); fd.myElemChk->setChecked( anIsElem );
fd.myAddChk ->setChecked( anIsAdd ); fd.myAddChk ->setChecked( anIsAdd );
@ -3858,7 +3858,7 @@ void SMESHGUI_CtrlInfoDlg::dump()
DumpFileDlg fd( this ); DumpFileDlg fd( this );
fd.setWindowTitle( tr( "SAVE_INFO" ) ); fd.setWindowTitle( tr( "SAVE_INFO" ) );
fd.setFilters( aFilters ); fd.setNameFilters( aFilters );
fd.myBaseChk->hide(); fd.myBaseChk->hide();
fd.myElemChk->hide(); fd.myElemChk->hide();
fd.myAddChk ->hide(); fd.myAddChk ->hide();

View File

@ -809,10 +809,10 @@ void SMESHGUI_MeshPatternDlg::onOpen()
SUIT_FileDlg* aDlg = new SUIT_FileDlg (this, true); SUIT_FileDlg* aDlg = new SUIT_FileDlg (this, true);
aDlg->setWindowTitle(tr("LOAD_PATTERN")); aDlg->setWindowTitle(tr("LOAD_PATTERN"));
aDlg->setFileMode(QFileDialog::ExistingFile); aDlg->setFileMode(QFileDialog::ExistingFile);
aDlg->setFilters(prepareFilters()); aDlg->setNameFilters(prepareFilters());
if (!myName->text().isEmpty()) if (!myName->text().isEmpty())
aDlg->selectFile(myName->text() + ".smp"); aDlg->selectFile(myName->text() + ".smp");
QPushButton* anOkBtn = qFindChild<QPushButton*>( aDlg, "OK" ); QPushButton* anOkBtn = aDlg->findChild<QPushButton*>( "OK" );
if (anOkBtn != 0) if (anOkBtn != 0)
anOkBtn->setText(tr("SMESH_BUT_OK")); anOkBtn->setText(tr("SMESH_BUT_OK"));
@ -826,9 +826,9 @@ void SMESHGUI_MeshPatternDlg::onOpen()
if (QFileInfo(fName).suffix().isEmpty()) if (QFileInfo(fName).suffix().isEmpty())
fName = autoExtension(fName); fName = autoExtension(fName);
fName = QDir::convertSeparators(fName); fName = QDir::toNativeSeparators(fName);
QString prev = QDir::convertSeparators(myName->text()); QString prev = QDir::toNativeSeparators(myName->text());
if (prev == fName) if (prev == fName)
return; return;

View File

@ -319,10 +319,10 @@ namespace StdMeshersGUI
void GridAxisTab::onMode(int isSpacing) void GridAxisTab::onMode(int isSpacing)
{ {
mySpacingTreeWdg->setShown( isSpacing ); mySpacingTreeWdg->setVisible( isSpacing );
myCoordList->setShown( !isSpacing ); myCoordList->setVisible( !isSpacing );
myStepSpin->setShown( !isSpacing ); myStepSpin->setVisible( !isSpacing );
myStepLabel->setShown( !isSpacing ); myStepLabel->setVisible( !isSpacing );
if ( isSpacing ) if ( isSpacing )
{ {
if ( mySpacingTreeWdg->topLevelItemCount() == 0 ) if ( mySpacingTreeWdg->topLevelItemCount() == 0 )

View File

@ -447,25 +447,25 @@ void StdMeshersGUI_NbSegmentsCreator::onValueChanged()
myTable->setData( arr ); //update data in table myTable->setData( arr ); //update data in table
} }
myScale->setShown( distr==1 ); myScale->setVisible( distr==1 );
myLScale->setShown( distr==1 ); myLScale->setVisible( distr==1 );
myReversedEdgesBox->setShown( distr!=0 ); myReversedEdgesBox->setVisible( distr!=0 );
if ( myReversedEdgesHelper ) { if ( myReversedEdgesHelper ) {
myReversedEdgesHelper->Clear(); myReversedEdgesHelper->Clear();
myReversedEdgesHelper->setShown( distr!=0 ); myReversedEdgesHelper->setVisible( distr!=0 );
} }
myDirectionWidget->ShowPreview( distr!=0 ); myDirectionWidget->ShowPreview( distr!=0 );
bool isFunc = distr==2 || distr==3; bool isFunc = distr==2 || distr==3;
#ifndef DISABLE_PLOT2DVIEWER #ifndef DISABLE_PLOT2DVIEWER
myPreview->setShown( isFunc ); myPreview->setVisible( isFunc );
#endif #endif
myConvBox->setShown( isFunc ); myConvBox->setVisible( isFunc );
myTable->setShown( distr==2 ); myTable->setVisible( distr==2 );
myExpr->setShown( distr==3 ); myExpr->setVisible( distr==3 );
myLExpr->setShown( distr==3 ); myLExpr->setVisible( distr==3 );
myInfo->setShown( distr==3); myInfo->setVisible( distr==3);
#ifndef DISABLE_PLOT2DVIEWER #ifndef DISABLE_PLOT2DVIEWER
//change of preview //change of preview