Skip to content

Commit

Permalink
v3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
AjayLimaye committed Mar 6, 2023
1 parent e93ee37 commit d2266f6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions drishti/global.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1156,9 +1156,21 @@ void Global::loadMatCapTextures()

QRandomGenerator::global()->bounded(0,list.size()-1);

QProgressDialog progress("Loading matcap textures",
QString(),
0, 100,
0);
progress.setCancelButton(0);
qApp->processEvents();

int texSize;
for (int i=0; i<list.size(); i++)
{
progress.setLabelText(QString("%1").arg(i));
progress.setValue(100*(float)i/(float)list.size());
progressBar()->setValue(100*(float)i/(float)list.size());
qApp->processEvents();

QString flnm = list.at(i).absoluteFilePath();
m_matCapTexNames << flnm;

Expand Down Expand Up @@ -1193,6 +1205,7 @@ void Global::loadMatCapTextures()
img.bits());
glDisable(GL_TEXTURE_2D);
}
progress.setValue(100);
}

QStringList Global::matCapTexNames() { return m_matCapTexNames; }
Expand Down

0 comments on commit d2266f6

Please sign in to comment.