diff --git a/src/meshlab/layerDialog.cpp b/src/meshlab/layerDialog.cpp index 53c877bde..1db97afdb 100644 --- a/src/meshlab/layerDialog.cpp +++ b/src/meshlab/layerDialog.cpp @@ -470,7 +470,7 @@ void LayerDialog::adaptLayout(QTreeWidgetItem * item) int meshId = mItem->m->id(); bool ok; int tagId = mItem->text(2).toInt(&ok); - if(ok && tagId >=0 ) + if(!ok || tagId < 0 ) //MeshTreeWidgetItems don't have a tag id, so we use -1 updateExpandedMap(meshId, -1, item->isExpanded()); } @@ -480,7 +480,7 @@ void LayerDialog::adaptLayout(QTreeWidgetItem * item) int meshId = parent->m->id(); bool ok; int tagId = item->text(2).toInt(&ok); - if(ok) + if(!ok) updateExpandedMap(meshId, tagId, item->isExpanded()); } } diff --git a/src/meshlab/mainwindow_Init.cpp b/src/meshlab/mainwindow_Init.cpp index de7b60067..2fccc81cd 100644 --- a/src/meshlab/mainwindow_Init.cpp +++ b/src/meshlab/mainwindow_Init.cpp @@ -511,14 +511,10 @@ void MainWindow::createActions() void MainWindow::createToolBars() { - this->setStyleSheet("QToolBar {\ - spacing: 0px; \ -}\ -QToolButton { /* all types of tool button */\ - border: 0px solid #8f8f91;\ - border-radius: 0px;\ - }"); -mainToolBar = addToolBar(tr("Standard")); +#if defined(Q_OS_MAC) + this->setStyleSheet("QToolBar {spacing: 0px; } QToolButton {border: 0px solid #8f8f91;border-radius: 0px;}"); +#endif + mainToolBar = addToolBar(tr("Standard")); // mainToolBar->setIconSize(QSize(32,32)); mainToolBar->addAction(this->newProjectAct); mainToolBar->addAction(this->openProjectAct); diff --git a/src/meshlab/mainwindow_RunTime.cpp b/src/meshlab/mainwindow_RunTime.cpp index 168b9eca3..fc586ddc9 100644 --- a/src/meshlab/mainwindow_RunTime.cpp +++ b/src/meshlab/mainwindow_RunTime.cpp @@ -2349,6 +2349,8 @@ bool MainWindow::importMesh(QString fileName) QTime allFileTime; allFileTime.start(); + bool layervisi = layerDialog->isVisible(); + showLayerDlg(false); foreach(fileName,fileNameList) { QFileInfo fi(fileName); @@ -2389,8 +2391,6 @@ bool MainWindow::importMesh(QString fileName) postOpenDialog.exec(); pCurrentIOPlugin->applyOpenParameter(extension, *mm, par); } - if (meshDoc()->size() > 1) - showLayerDlg(true); } else { @@ -2398,6 +2398,7 @@ bool MainWindow::importMesh(QString fileName) GLA()->Logf(0,"Warning: Mesh %s has not been opened",qPrintable(fileName)); } }// end foreach file of the input list + showLayerDlg(meshDoc()->size() > 1 || layervisi); GLA()->Logf(0,"All files opened in %i msec",allFileTime.elapsed()); this->currentViewContainer()->resetAllTrackBall();