mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-17 01:54:42 +00:00
- added best tab selection also in open and append project
This commit is contained in:
parent
bd464dd3b4
commit
c822d280a5
@ -272,7 +272,9 @@ private:
|
||||
|
||||
void initDocumentMeshRenderState(MeshLabXMLFilterContainer* mfc);
|
||||
void initDocumentRasterRenderState(MeshLabXMLFilterContainer* mfc);
|
||||
|
||||
void setCurrentMeshBestTab();
|
||||
|
||||
|
||||
QNetworkAccessManager *httpReq;
|
||||
QBuffer myLocalBuf;
|
||||
int idHost;
|
||||
|
||||
@ -2301,8 +2301,9 @@ GLA()->setDrawMode(GLW::DMPoints);*/
|
||||
meshDoc()->setBusy(false);
|
||||
if(this->GLA() == 0) return false;
|
||||
MultiViewer_Container* mvc = currentViewContainer();
|
||||
if (mvc != NULL)
|
||||
mvc->resetAllTrackBall();
|
||||
if (mvc != NULL)
|
||||
mvc->resetAllTrackBall();
|
||||
setCurrentMeshBestTab();
|
||||
qb->reset();
|
||||
saveRecentProjectList(fileName);
|
||||
globrendtoolbar->setEnabled(true);
|
||||
@ -2389,12 +2390,34 @@ bool MainWindow::appendProject(QString fileName)
|
||||
globrendtoolbar->setEnabled(true);
|
||||
meshDoc()->setBusy(false);
|
||||
if(this->GLA() == 0) return false;
|
||||
this->currentViewContainer()->resetAllTrackBall();
|
||||
MultiViewer_Container* mvc = currentViewContainer();
|
||||
if (mvc != NULL)
|
||||
mvc->resetAllTrackBall();
|
||||
|
||||
setCurrentMeshBestTab();
|
||||
qb->reset();
|
||||
saveRecentProjectList(fileName);
|
||||
return true;
|
||||
}
|
||||
|
||||
void MainWindow::setCurrentMeshBestTab()
|
||||
{
|
||||
if (layerDialog == NULL)
|
||||
return;
|
||||
|
||||
MultiViewer_Container* mvc = currentViewContainer();
|
||||
if (mvc != NULL)
|
||||
{
|
||||
MLSceneGLSharedDataContext* cont = mvc->sharedDataContext();
|
||||
if ((GLA() != NULL) && (meshDoc() != NULL) && (meshDoc()->mm() != NULL))
|
||||
{
|
||||
MLRenderingData dt;
|
||||
cont->getRenderInfoPerMeshView(meshDoc()->mm()->id(), GLA()->context(), dt);
|
||||
layerDialog->setCurrentTab(dt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::newProject(const QString& projName)
|
||||
{
|
||||
if (gpumeminfo == NULL)
|
||||
@ -2717,16 +2740,8 @@ bool MainWindow::importMeshWithLayerManagement(QString fileName)
|
||||
bool res = importMesh(fileName,false);
|
||||
globrendtoolbar->setEnabled(true);
|
||||
if (layerDialog != NULL)
|
||||
{
|
||||
showLayerDlg(layervisible || meshDoc()->meshList.size());
|
||||
MLSceneGLSharedDataContext* cont = currentViewContainer()->sharedDataContext();
|
||||
if ((cont != NULL) && (GLA() != NULL) && (meshDoc() != NULL) && (meshDoc()->mm() != NULL))
|
||||
{
|
||||
MLRenderingData dt;
|
||||
cont->getRenderInfoPerMeshView(meshDoc()->mm()->id(), GLA()->context(), dt);
|
||||
layerDialog->setCurrentTab(dt);
|
||||
}
|
||||
}
|
||||
setCurrentMeshBestTab();
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user