From 17fa33cd580be3ae657049f5ad91dd5f2f183aec Mon Sep 17 00:00:00 2001 From: dnk-88 Date: Sat, 7 May 2011 18:23:23 +0300 Subject: [PATCH] Fixed: geqt correctly handles in the FileOpenDialog of cancel action and empty icon --- .../src/georges_treeview_dialog.cpp | 4 +++- .../georges_editor_qt/src/georgesform_model.cpp | 13 ++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/src/georges_treeview_dialog.cpp b/code/ryzom/tools/leveldesign/georges_editor_qt/src/georges_treeview_dialog.cpp index dea8d8ce7..65c53ed78 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/src/georges_treeview_dialog.cpp +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/src/georges_treeview_dialog.cpp @@ -222,7 +222,7 @@ namespace NLQT { COFile file; - std::string s = CPath::lookup(loadedForm.toStdString()); + std::string s = CPath::lookup(loadedForm.toStdString(), false); if (file.open (s)) { try @@ -323,6 +323,8 @@ namespace NLQT path, "Images (*.png *.tga)" ); + if (file.isNull()) + return; QFileInfo info = QFileInfo(file); // TODO? diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_model.cpp b/code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_model.cpp index ab3092455..956380851 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_model.cpp +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_model.cpp @@ -184,10 +184,17 @@ namespace NLQT if (Modules::objViewInt()) { QIcon *icon = Modules::objViewInt()->saveOneImage(value.toStdString()); - if (icon->isNull()) - return QIcon(":/images/pqrticles.png"); + if (icon) + { + if(icon->isNull()) + return QIcon(":/images/pqrticles.png"); + else + return QIcon(*icon); + } else - return QIcon(*icon); + { + return QIcon(); + } } } else if(value.contains(".tga") || value.contains(".png"))