Skip to content

Commit

Permalink
V1.65 fix bug of viewer render after mesh loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulBasic committed Oct 19, 2020
1 parent a9217f9 commit 0c3db8a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions J3DGUI/QT3DReconstruction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,13 @@ bool QT3DReconstruction::openJ3DView(QString fileName)
return false;
}
time_t tm = time(NULL);
QPalette pa;

while (!Global::CheckViewerMsg()) {

pa.setColor(QPalette::WindowText, Qt::yellow);
ui.label_engine->setPalette(pa);
ui.label_engine->setText("正在打开J3D模型文件 ");
if (time(NULL) - tm > 60) {
QMessageBox::information(NULL, "失败", "打开j3d文件失败,请尝试用管理员身份运行软件 ", QMessageBox::Ok, QMessageBox::Ok);
WinExec("taskkill /f /im J3DView.dll", SW_HIDE);
Expand Down
2 changes: 1 addition & 1 deletion Viewer/Scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ bool Scene::Init(int width, int height, LPCTSTR windowName, LPCTSTR fileName, LP
if (fileName == NULL || !Open(fileName, meshFileName))
window.SetCamera(CameraPtr(new Camera()));

window.SetVisible(true);
window.SetVisible(false);
Global::sce = (void*)this;
InstallHook();
return true;
Expand Down
3 changes: 2 additions & 1 deletion Viewer/Viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ int main(int argc, LPCTSTR* argv)
}
cmd << tm;
cmd.close();

Sleep(1500);
viewer.window.SetVisible(true);
viewer.Loop();
Finalize();
return EXIT_SUCCESS;
Expand Down

0 comments on commit 0c3db8a

Please sign in to comment.