Clear persistent data after item assigned. Fix some material selection screen functionality.

develop
Anuradha Dissanayake 2013-01-24 19:21:12 +13:00
parent f036360688
commit 6546af94ee
1 changed files with 14 additions and 1 deletions

@ -478,7 +478,7 @@ public:
{ {
return setHighlightByMouse(); return setHighlightByMouse();
} }
else else if (allow_search)
{ {
// Search query typing mode always on // Search query typing mode always on
@ -505,6 +505,10 @@ public:
return true; return true;
} }
else
{
return false;
}
return true; return true;
} }
@ -664,6 +668,12 @@ struct ItemFilter
return valid; return valid;
} }
void clear()
{
mat_mask.whole = 0;
materials.clear();
}
private: private:
bool valid; bool valid;
}; };
@ -720,8 +730,10 @@ public:
} }
if (input->count(interface_key::CUSTOM_SHIFT_C)) if (input->count(interface_key::CUSTOM_SHIFT_C))
{ {
filter->clear();
masks_column.clear_selection(); masks_column.clear_selection();
materials_column.clear_selection(); materials_column.clear_selection();
populateMaterials();
} }
else if (input->count(interface_key::SEC_SELECT)) else if (input->count(interface_key::SEC_SELECT))
{ {
@ -980,6 +992,7 @@ public:
if (closest_distance > -1 && assignItem(*closest_item)) if (closest_distance > -1 && assignItem(*closest_item))
{ {
items_vector->erase(closest_item); items_vector->erase(closest_item);
remove();
return true; return true;
} }