From 316a7edba7d9039f3e4ace2e05fa8b8df3efee03 Mon Sep 17 00:00:00 2001 From: Guido Ranzuglia granzuglia Date: Tue, 2 Oct 2012 12:48:09 +0000 Subject: [PATCH] - layerDialog now will be automatically opened: * every time a raster is imported * after the second mesh is loaded --- src/meshlab/mainwindow.h | 2 +- src/meshlab/mainwindow_Init.cpp | 2 +- src/meshlab/mainwindow_RunTime.cpp | 12 ++++++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/meshlab/mainwindow.h b/src/meshlab/mainwindow.h index 8db8cd752..37ee73772 100644 --- a/src/meshlab/mainwindow.h +++ b/src/meshlab/mainwindow.h @@ -143,7 +143,7 @@ private slots: void showInfoPane(); void showTrackBall(); void resetTrackBall(); - void showLayerDlg(); + void showLayerDlg(bool visible); void showRaster(); ///////////Slot Menu Windows ///////////////////// void updateWindowMenu(); diff --git a/src/meshlab/mainwindow_Init.cpp b/src/meshlab/mainwindow_Init.cpp index 784dac394..2706b5137 100644 --- a/src/meshlab/mainwindow_Init.cpp +++ b/src/meshlab/mainwindow_Init.cpp @@ -313,7 +313,7 @@ void MainWindow::createActions() showLayerDlgAct = new QAction (QIcon(":/images/layers.png"),tr("Show Layer Dialog"), this); showLayerDlgAct->setCheckable(true); showLayerDlgAct->setChecked(true); - connect(showLayerDlgAct, SIGNAL(triggered()), this, SLOT(showLayerDlg())); + connect(showLayerDlgAct, SIGNAL(triggered(bool)), this, SLOT(showLayerDlg(bool))); showRasterAct = new QAction (QIcon(":/images/view_raster.png"),tr("Show Current Raster Mode"), this); diff --git a/src/meshlab/mainwindow_RunTime.cpp b/src/meshlab/mainwindow_RunTime.cpp index 342f7451c..ffe8edc94 100644 --- a/src/meshlab/mainwindow_RunTime.cpp +++ b/src/meshlab/mainwindow_RunTime.cpp @@ -1906,6 +1906,7 @@ bool MainWindow::importRaster(const QString& fileImg) rm->setLabel(fileImg); rm->addPlane(new Plane(fileName,QString(""))); meshDoc()->setBusy(false); + showLayerDlg(true); /// Intrinsics extraction from EXIF /// If no CCD Width value is provided, the intrinsics are extracted using the Equivalent 35mm focal @@ -2139,7 +2140,7 @@ bool MainWindow::importMesh(QString fileName) pCurrentIOPlugin->applyOpenParameter(extension, *mm, par); } if (meshDoc()->size() > 1) - showLayerDlg(); + showLayerDlg(true); } else GLA()->log->Logf(0,"Warning: Mesh %s has not been opened",qPrintable(fileName)); @@ -2406,7 +2407,14 @@ void MainWindow::showInfoPane() {if(GLA() != 0) GLA()->infoAreaVisible =!GLA()- void MainWindow::showTrackBall() {if(GLA() != 0) GLA()->showTrackBall(!GLA()->isTrackBallVisible());} void MainWindow::resetTrackBall(){if(GLA() != 0) GLA()->resetTrackBall();} void MainWindow::showRaster() {if(GLA() != 0) GLA()->showRaster((QApplication::keyboardModifiers () & Qt::ShiftModifier));} -void MainWindow::showLayerDlg() {if(GLA() != 0) layerDialog->setVisible( !layerDialog->isVisible() );} +void MainWindow::showLayerDlg(bool visible) +{ + if(GLA() != 0) + { + layerDialog->setVisible( visible); + showLayerDlgAct->setChecked(visible); + } +} void MainWindow::showXMLPluginEditorGui(){if(GLA() != 0) plugingui->setVisible( !plugingui->isVisible() );}