Changed the default value of the busy semaphor for document. Now it is false (e.g. when starting the empty doc is not busy)

Refactored  the advanceto next layer function
This commit is contained in:
Paolo Cignoni cignoni 2012-11-30 08:00:22 +00:00
parent 4aa40f3d99
commit 21751dbc5f

View File

@ -493,7 +493,7 @@ public:
rasterIdCounter=0;
currentMesh = 0;
currentRaster = 0;
busy=true;
busy=false;
}
//deletes each meshModel
@ -523,18 +523,9 @@ public:
template <class LayerElement>
void advanceCurrentElement(QList<LayerElement *>& elemList, LayerElement* curr, int pos)
{
typename QList<LayerElement *>::iterator mi;
for(mi=elemList.begin(); mi!=elemList.end();++mi)
if(*mi == curr) break;
assert(mi!=elemList.end());
while(pos>0)
{
pos--;
mi++;
if(mi==elemList.end()) mi=elemList.begin();
}
setCurrent((*mi));
assert(!elemList.empty() && elemList.contains(curr));
int currPos = elemList.indexOf(curr);
setCurrent(elemList.at((currPos+pos)%elemList.size()));
}
MeshModel *mm() {