Skip to content

Commit 0c3db8a

Browse files
committed
V1.65 fix bug of viewer render after mesh loaded
1 parent a9217f9 commit 0c3db8a

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

J3DGUI/QT3DReconstruction.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,13 @@ bool QT3DReconstruction::openJ3DView(QString fileName)
321321
return false;
322322
}
323323
time_t tm = time(NULL);
324+
QPalette pa;
325+
324326
while (!Global::CheckViewerMsg()) {
327+
328+
pa.setColor(QPalette::WindowText, Qt::yellow);
329+
ui.label_engine->setPalette(pa);
330+
ui.label_engine->setText("正在打开J3D模型文件 ");
325331
if (time(NULL) - tm > 60) {
326332
QMessageBox::information(NULL, "失败", "打开j3d文件失败,请尝试用管理员身份运行软件 ", QMessageBox::Ok, QMessageBox::Ok);
327333
WinExec("taskkill /f /im J3DView.dll", SW_HIDE);

Viewer/Scene.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ bool Scene::Init(int width, int height, LPCTSTR windowName, LPCTSTR fileName, LP
303303
if (fileName == NULL || !Open(fileName, meshFileName))
304304
window.SetCamera(CameraPtr(new Camera()));
305305

306-
window.SetVisible(true);
306+
window.SetVisible(false);
307307
Global::sce = (void*)this;
308308
InstallHook();
309309
return true;

Viewer/Viewer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,8 @@ int main(int argc, LPCTSTR* argv)
241241
}
242242
cmd << tm;
243243
cmd.close();
244-
244+
Sleep(1500);
245+
viewer.window.SetVisible(true);
245246
viewer.Loop();
246247
Finalize();
247248
return EXIT_SUCCESS;

0 commit comments

Comments
 (0)