mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-19 19:14:42 +00:00
- fixed "MLRenderGlobalToolBar status is not correctly initialized" bug
This commit is contained in:
parent
ddd24511b0
commit
a21705fca4
@ -2613,7 +2613,6 @@ bool MainWindow::loadMesh(const QString& fileName, MeshIOInterface *pCurrentIOPl
|
||||
|
||||
saveRecentFileList(fileName);
|
||||
|
||||
|
||||
if(!meshDoc()->mm()->cm.textures.empty())
|
||||
updateTexture(meshDoc()->mm()->id());
|
||||
|
||||
|
||||
@ -1492,6 +1492,15 @@ void MLRenderingGlobalToolbar::statusConsistencyCheck(const MLSceneGLSharedDataC
|
||||
isvalidforall &= rendact->isRenderingDataEnabled(it.value());
|
||||
}
|
||||
rgact->setChecked(isvalidforall);
|
||||
MLRenderingZeroOrOneActionGroup* actgroup = qobject_cast<MLRenderingZeroOrOneActionGroup*>(rgact->actionGroup());
|
||||
if (actgroup != NULL)
|
||||
{
|
||||
if (rgact->isChecked())
|
||||
actgroup->setLastClicked(rgact);
|
||||
else
|
||||
if (actgroup->checkedAction() == NULL)
|
||||
actgroup->setLastClicked(NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1648,6 +1657,11 @@ MLRenderingZeroOrOneActionGroup::MLRenderingZeroOrOneActionGroup(QObject* parent
|
||||
connect(this, SIGNAL(triggered(QAction*)), this, SLOT(toggle(QAction*)));
|
||||
}
|
||||
|
||||
void MLRenderingZeroOrOneActionGroup::setLastClicked(MLRenderingGlobalAction* ga)
|
||||
{
|
||||
_lastclicked = ga;
|
||||
}
|
||||
|
||||
void MLRenderingZeroOrOneActionGroup::toggle(QAction* act)
|
||||
{
|
||||
if (act == NULL)
|
||||
@ -1655,6 +1669,7 @@ void MLRenderingZeroOrOneActionGroup::toggle(QAction* act)
|
||||
MLRenderingGlobalAction* ract = qobject_cast<MLRenderingGlobalAction*>(act);
|
||||
if (ract == NULL)
|
||||
return;
|
||||
|
||||
foreach(QAction* curract, actions())
|
||||
{
|
||||
MLRenderingGlobalAction* rendcurract = qobject_cast<MLRenderingGlobalAction*>(curract);
|
||||
@ -1666,6 +1681,7 @@ void MLRenderingZeroOrOneActionGroup::toggle(QAction* act)
|
||||
else
|
||||
if ((ract == rendcurract) && (_lastclicked == ract))
|
||||
_lastclicked = NULL;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,6 +43,7 @@ public:
|
||||
|
||||
public:
|
||||
bool isEsclusive() { return true; }
|
||||
void setLastClicked(MLRenderingGlobalAction* ga);
|
||||
private slots :
|
||||
void setExclusive(bool) {}
|
||||
void toggle(QAction* act);
|
||||
@ -301,7 +302,6 @@ private:
|
||||
MLRenderingGlobalAction* _solidvertcolglobact;
|
||||
MLRenderingGlobalAction* _solidfacecolglobact;
|
||||
MLRenderingGlobalAction* _solidtextcolglobact;
|
||||
|
||||
signals:
|
||||
void updateRenderingDataAccordingToAction(MLRenderingGlobalAction*);
|
||||
//void updateRenderingDataAccordingToAction(int, MLRenderingAction*,bool);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user