* brushexport plugin: for 'Ignored materials' use input after last slash, as comparison is only using this part

This commit is contained in:
Garux 2020-01-05 02:08:52 +03:00
parent 31014dcf4a
commit 58c40278a8

View File

@ -5,13 +5,14 @@
#include "qerplugin.h" #include "qerplugin.h"
#include "debugging/debugging.h" #include "debugging/debugging.h"
#include "os/path.h"
#include "support.h" #include "support.h"
#include "export.h" #include "export.h"
// stuff from interface.cpp // stuff from interface.cpp
void DestroyWindow(); 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 //! TODO hide window on close
namespace callbacks { namespace callbacks {
@ -115,7 +116,7 @@ void OnAddMaterial( GtkButton* button, gpointer user_data ){
GtkEntry* edit = GTK_ENTRY( lookup_widget( GTK_WIDGET( button ), "ed_materialname" ) ); GtkEntry* edit = GTK_ENTRY( lookup_widget( GTK_WIDGET( button ), "ed_materialname" ) );
ASSERT_NOTNULL( edit ); 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 ) { 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" ) ) ) ); GtkListStore* list = GTK_LIST_STORE( gtk_tree_view_get_model( GTK_TREE_VIEW( lookup_widget( GTK_WIDGET( button ), "t_materialist" ) ) ) );
GtkTreeIter iter; GtkTreeIter iter;