Skip to content

Commit

Permalink
fix search in setting tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
supermerill committed Dec 23, 2023
1 parent 766bb03 commit c1d9013
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/slic3r/GUI/Search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ namespace Search {
static char marker_by_type(Preset::Type type, PrinterTechnology pt)
{
switch(type) {
case Preset::TYPE_FREQUENT_FFF:
case Preset::TYPE_FREQUENT_SLA:
case Preset::TYPE_FFF_PRINT:
case Preset::TYPE_SLA_PRINT:
return ImGui::PrintIconMarker;
Expand All @@ -47,7 +49,7 @@ static char marker_by_type(Preset::Type type, PrinterTechnology pt)
case Preset::TYPE_PRINTER:
return pt == ptSLA ? ImGui::PrinterSlaIconMarker : ImGui::PrinterIconMarker;
default:
return ' ';
return ImGui::PrintIconMarker;
}
}

Expand Down Expand Up @@ -994,9 +996,11 @@ void SearchListModel::Clear()
void SearchListModel::Prepend(const std::string& label)
{
const char icon_c = label.at(0);
int icon_idx = icon_idxs.at(icon_c);
wxString str = from_u8(label).Remove(0, 1);
wxString str = from_u8(label).Remove(0, 1);

int icon_idx = 0;
if(icon_c < icon_idxs.size())
icon_idx = icon_idxs.at(icon_c);
m_values.emplace_back(str, icon_idx);

RowPrepended();
Expand Down

0 comments on commit c1d9013

Please sign in to comment.