diff --git a/qglengine/gltexture_manager.h b/qglengine/gltexture_manager.h index b9473d8..fe2736a 100644 --- a/qglengine/gltexture_manager.h +++ b/qglengine/gltexture_manager.h @@ -34,7 +34,7 @@ public: static void addSearchPath(const QString & path) {if (!search_pathes.contains(path)) search_pathes << path;} static void clearSearchPathes() {search_pathes.clear();} static QStringList searchPathes() {return search_pathes;} - QString findFile(const QString & path); + static QString findFile(const QString & path); GLuint loadTexture(const QString & path, bool ownership = true, bool bump = false); GLuint loadTexture(const QImage & image, bool ownership = true, bool bump = false); QImage loadTextureImage(const QString & path, bool bump = false); diff --git a/qglengine/widgets/material_map_editor.cpp b/qglengine/widgets/material_map_editor.cpp index 70baf77..95c93d8 100644 --- a/qglengine/widgets/material_map_editor.cpp +++ b/qglengine/widgets/material_map_editor.cpp @@ -18,6 +18,7 @@ #include "material_map_editor.h" #include "ui_material_map_editor.h" +#include "gltexture_manager.h" #include "glmaterial.h" @@ -47,7 +48,7 @@ void MaterialMapEditor::resizeEvent(QResizeEvent * e) { void MaterialMapEditor::updateIcon() { - ui->iconedLabel->setIcon(QIcon(ui->linePath->property("GLpath").toString())); + ui->iconedLabel->setIcon(QIcon(TextureManager::findFile(ui->linePath->property("GLpath").toString()))); } diff --git a/qglengine/widgets/scene_tree.cpp b/qglengine/widgets/scene_tree.cpp index 7c5d7c3..f960aae 100644 --- a/qglengine/widgets/scene_tree.cpp +++ b/qglengine/widgets/scene_tree.cpp @@ -63,6 +63,8 @@ SceneTree::SceneTree(QWidget * parent): QWidget(parent) { icon_vis[0] = QIcon(":/icons/layer-visible-off.png"); icon_vis[1] = QIcon(":/icons/layer-visible-on.png"); ui->treeObjects->addActions(actionsSelection()); + ui->treeObjects->addAction (newSeparator()); + ui->treeObjects->addActions(actionsAdd()); ui->buttonFilter->addActions(QList() << ui->actionFilter_node << ui->actionFilter_mesh << ui->actionFilter_light << ui->actionFilter_camera); view = 0; hidden_by_filter = obj_count = 0;