mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-16 01:24:36 +00:00
- added checkConsinstencyStatus to the global rendering toolbar
This commit is contained in:
parent
fa6214d8b3
commit
fd105ee75f
@ -357,6 +357,11 @@ void MainWindow::updateLayerDialog()
|
||||
if (it != dtf.end())
|
||||
layerDialog->updateRenderingParametersTab(meshDoc()->mm()->id(),*it);
|
||||
}
|
||||
if (globrendtoolbar != NULL)
|
||||
{
|
||||
shared->getRenderInfoPerMeshView(GLA()->context(), dtf);
|
||||
globrendtoolbar->statusConsistencyCheck(dtf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3478,6 +3483,12 @@ void MainWindow::setRenderingData(int mid,const MLRenderingData& dt)
|
||||
share->setRenderingDataPerMeshView(mid, GLA()->context(), dt);
|
||||
share->manageBuffers(mid);
|
||||
//addRenderingSystemLogInfo(mid);
|
||||
if (globrendtoolbar != NULL)
|
||||
{
|
||||
MLSceneGLSharedDataContext::PerMeshRenderingDataMap mp;
|
||||
share->getRenderInfoPerMeshView(GLA()->context(), mp);
|
||||
globrendtoolbar->statusConsistencyCheck(mp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3546,6 +3557,7 @@ void MainWindow::updateRenderingDataAccordingToActionsCommonCode(int meshid, con
|
||||
dec.updateMeshDecorationData(*mm, olddt, dt);
|
||||
}
|
||||
/*}*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -3752,7 +3764,11 @@ void MainWindow::updateLog()
|
||||
void MainWindow::switchCurrentContainer(QMdiSubWindow * subwin)
|
||||
{
|
||||
if (subwin == NULL)
|
||||
{
|
||||
if (globrendtoolbar != NULL)
|
||||
globrendtoolbar->reset();
|
||||
return;
|
||||
}
|
||||
if (mdiarea->currentSubWindow() != 0)
|
||||
{
|
||||
MultiViewer_Container* split = qobject_cast<MultiViewer_Container*>(mdiarea->currentSubWindow()->widget());
|
||||
|
||||
@ -1469,6 +1469,33 @@ MLRenderingGlobalToolbar::MLRenderingGlobalToolbar(QWidget* parent /*= NULL*/)
|
||||
initGui();
|
||||
}
|
||||
|
||||
void MLRenderingGlobalToolbar::reset()
|
||||
{
|
||||
foreach(QAction* act, actions())
|
||||
{
|
||||
if (act != NULL)
|
||||
act->setChecked(false);
|
||||
}
|
||||
}
|
||||
|
||||
void MLRenderingGlobalToolbar::statusConsistencyCheck(const MLSceneGLSharedDataContext::PerMeshRenderingDataMap& mp)
|
||||
{
|
||||
foreach(QAction* act, actions())
|
||||
{
|
||||
MLRenderingGlobalAction* rgact = qobject_cast<MLRenderingGlobalAction*>(act);
|
||||
if (rgact != NULL)
|
||||
{
|
||||
bool isvalidforall = (mp.size() != 0);
|
||||
for (MLSceneGLSharedDataContext::PerMeshRenderingDataMap::const_iterator it = mp.begin(); it != mp.end(); ++it)
|
||||
{
|
||||
foreach(MLRenderingAction* rendact, rgact->mainActions())
|
||||
isvalidforall &= rendact->isRenderingDataEnabled(it.value());
|
||||
}
|
||||
rgact->setChecked(isvalidforall);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MLRenderingGlobalToolbar::toggle(QAction* act)
|
||||
{
|
||||
MLRenderingGlobalAction* ract = qobject_cast<MLRenderingGlobalAction*>(act);
|
||||
|
||||
@ -276,6 +276,10 @@ public:
|
||||
MLRenderingGlobalToolbar(QWidget* parent = NULL);
|
||||
|
||||
~MLRenderingGlobalToolbar() {}
|
||||
|
||||
void reset();
|
||||
public slots:
|
||||
void statusConsistencyCheck(const MLSceneGLSharedDataContext::PerMeshRenderingDataMap& mp);
|
||||
private slots:
|
||||
void toggle(QAction* act);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user