Browse Source

Added hacky workaround for tag corruption issue

tags/v0.5.0
Andrew Belt 7 years ago
parent
commit
06bcf2a4c9
2 changed files with 8 additions and 3 deletions
  1. +7
    -3
      src/app/AddModuleWindow.cpp
  2. +1
    -0
      src/plugin.cpp

+ 7
- 3
src/app/AddModuleWindow.cpp View File

@@ -55,7 +55,9 @@ struct MetadataMenu : ListMenu {
// Tag list
if (!model->tags.empty()) {
for (ModelTag tag : model->tags) {
addChild(construct<MenuLabel>(&MenuEntry::text, gTagNames[tag]));
if (0 <= tag && tag < NUM_TAGS) {
addChild(construct<MenuLabel>(&MenuEntry::text, gTagNames[tag]));
}
}
addChild(construct<MenuEntry>());
}
@@ -95,8 +97,10 @@ static bool isModelMatch(Model *model, std::string search) {
str += " ";
str += model->slug;
for (ModelTag tag : model->tags) {
str += " ";
str += gTagNames[tag];
if (0 <= tag && tag < NUM_TAGS) {
str += " ";
str += gTagNames[tag];
}
}
str = tolower(str);
search = tolower(search);


+ 1
- 0
src/plugin.cpp View File

@@ -145,6 +145,7 @@ static int loadPlugin(std::string path) {
// Add plugin to list
gPlugins.push_back(plugin);
info("Loaded plugin %s", libraryFilename.c_str());

return 0;
}



Loading…
Cancel
Save