mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-20 03:16:10 +00:00
- fixed "closing mesh document" crash
This commit is contained in:
parent
bf8a55f3be
commit
06cda96e60
@ -164,6 +164,7 @@ public:
|
||||
void updateSharedContextDataAfterFilterExecution(int postcondmask,int fclasses,bool& newmeshcreated);
|
||||
|
||||
private slots:
|
||||
void closeCurrentDocument();
|
||||
//////////// Slot Menu File //////////////////////
|
||||
void reload();
|
||||
void reloadAllMesh();
|
||||
|
||||
@ -76,12 +76,6 @@ MainWindow::MainWindow()
|
||||
connect(windowMapper, SIGNAL(mapped(QWidget*)), this, SLOT(wrapSetActiveSubWindow(QWidget *)));
|
||||
// Quando si passa da una finestra all'altra aggiorna lo stato delle toolbar e dei menu
|
||||
connect(mdiarea, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(switchCurrentContainer(QMdiSubWindow *)));
|
||||
connect(mdiarea, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(updateLayerDialog()));
|
||||
connect(mdiarea, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(updateMenus()));
|
||||
connect(mdiarea, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(updateWindowMenu()));
|
||||
connect(mdiarea, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(updateStdDialog()));
|
||||
connect(mdiarea, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(updateXMLStdDialog()));
|
||||
connect(mdiarea, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(updateDocumentScriptBindings()));
|
||||
httpReq = new QNetworkAccessManager(this);
|
||||
connect(httpReq, SIGNAL(finished(QNetworkReply*)), this, SLOT(connectionDone(QNetworkReply*)));
|
||||
|
||||
|
||||
@ -495,12 +495,12 @@ while(ii < meshDoc()->meshList.size())
|
||||
a->setEnabled(false);
|
||||
|
||||
}
|
||||
|
||||
if(GLA())
|
||||
GLArea* tmp = GLA();
|
||||
if(tmp != NULL)
|
||||
{
|
||||
showLayerDlgAct->setChecked(layerDialog->isVisible());
|
||||
showRasterAct->setEnabled(meshDoc()->rm() != 0);
|
||||
showRasterAct->setChecked(GLA()->isRaster());
|
||||
showRasterAct->setChecked(tmp->isRaster());
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2394,6 +2394,7 @@ void MainWindow::newProject(const QString& projName)
|
||||
connect(&mvcont->meshDoc,SIGNAL(meshAdded(int)),this,SLOT(meshAdded(int)));
|
||||
connect(&mvcont->meshDoc,SIGNAL(meshRemoved(int)),this,SLOT(meshRemoved(int)));
|
||||
connect(&mvcont->meshDoc, SIGNAL(documentUpdated()), this, SLOT(documentUpdateRequested()));
|
||||
connect(mvcont, SIGNAL(closingMultiViewerContainer()), this, SLOT(closeCurrentDocument()));
|
||||
mdiarea->addSubWindow(mvcont);
|
||||
connect(mvcont,SIGNAL(updateMainWindowMenus()),this,SLOT(updateMenus()));
|
||||
connect(mvcont,SIGNAL(updateDocumentViewer()),this,SLOT(updateLayerDialog()));
|
||||
@ -3744,4 +3745,12 @@ void MainWindow::switchCurrentContainer(QMdiSubWindow * subwin)
|
||||
updateXMLStdDialog();
|
||||
updateDocumentScriptBindings();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::closeCurrentDocument()
|
||||
{
|
||||
_currviewcontainer = NULL;
|
||||
layerDialog->setVisible(false);
|
||||
if (mdiarea != NULL)
|
||||
mdiarea->closeActiveSubWindow();
|
||||
}
|
||||
@ -356,7 +356,10 @@ void MultiViewer_Container::closeEvent( QCloseEvent *event )
|
||||
}
|
||||
|
||||
if (close)
|
||||
{
|
||||
emit closingMultiViewerContainer();
|
||||
event->accept();
|
||||
}
|
||||
else
|
||||
event->ignore();
|
||||
}
|
||||
|
||||
@ -111,6 +111,7 @@ public:
|
||||
signals:
|
||||
void updateMainWindowMenus(); //updates the menus of the meshlab MainWindow
|
||||
void updateDocumentViewer();
|
||||
void closingMultiViewerContainer();
|
||||
|
||||
public slots:
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user