From 58c40278a80b0da2a63ee9a4eee55ea294aa64a7 Mon Sep 17 00:00:00 2001 From: Garux Date: Sun, 5 Jan 2020 02:08:52 +0300 Subject: [PATCH] * brushexport plugin: for 'Ignored materials' use input after last slash, as comparison is only using this part --- contrib/brushexport/callbacks.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/brushexport/callbacks.cpp b/contrib/brushexport/callbacks.cpp index 681c4707..fe89e9e4 100644 --- a/contrib/brushexport/callbacks.cpp +++ b/contrib/brushexport/callbacks.cpp @@ -5,13 +5,14 @@ #include "qerplugin.h" #include "debugging/debugging.h" +#include "os/path.h" #include "support.h" #include "export.h" // stuff from interface.cpp void DestroyWindow(); -//! TODO add tooltip for ignore: shader name after last slash, case sensitive // or make insensitive +//! TODO ignore: make case insensitive //! TODO hide window on close namespace callbacks { @@ -115,7 +116,7 @@ void OnAddMaterial( GtkButton* button, gpointer user_data ){ GtkEntry* edit = GTK_ENTRY( lookup_widget( GTK_WIDGET( button ), "ed_materialname" ) ); ASSERT_NOTNULL( edit ); - const gchar* name = gtk_entry_get_text( edit ); + const gchar* name = path_get_filename_start( gtk_entry_get_text( edit ) ); if ( g_utf8_strlen( name, -1 ) > 0 ) { GtkListStore* list = GTK_LIST_STORE( gtk_tree_view_get_model( GTK_TREE_VIEW( lookup_widget( GTK_WIDGET( button ), "t_materialist" ) ) ) ); GtkTreeIter iter;