mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 12:35:46 +00:00
Merge remote-tracking branch 'cc9cii/Bug-No-1710'
This commit is contained in:
commit
77e9ac8975
@ -91,7 +91,7 @@ return ( type == CSMWorld::ColumnBase::Display_Activator
|
|||||||
|| type == CSMWorld::ColumnBase::Display_Static
|
|| type == CSMWorld::ColumnBase::Display_Static
|
||||||
|| type == CSMWorld::ColumnBase::Display_Weapon);
|
|| type == CSMWorld::ColumnBase::Display_Weapon);
|
||||||
}
|
}
|
||||||
bool CSMWorld::TableMimeData::isReferencable(CSMWorld::UniversalId::Type type) const
|
bool CSMWorld::TableMimeData::isReferencable(CSMWorld::UniversalId::Type type)
|
||||||
{
|
{
|
||||||
return ( type == CSMWorld::UniversalId::Type_Activator
|
return ( type == CSMWorld::UniversalId::Type_Activator
|
||||||
|| type == CSMWorld::UniversalId::Type_Potion
|
|| type == CSMWorld::UniversalId::Type_Potion
|
||||||
@ -222,7 +222,6 @@ namespace
|
|||||||
{ CSMWorld::UniversalId::Type_Race, CSMWorld::ColumnBase::Display_Race },
|
{ CSMWorld::UniversalId::Type_Race, CSMWorld::ColumnBase::Display_Race },
|
||||||
{ CSMWorld::UniversalId::Type_Skill, CSMWorld::ColumnBase::Display_Skill },
|
{ CSMWorld::UniversalId::Type_Skill, CSMWorld::ColumnBase::Display_Skill },
|
||||||
{ CSMWorld::UniversalId::Type_Class, CSMWorld::ColumnBase::Display_Class },
|
{ CSMWorld::UniversalId::Type_Class, CSMWorld::ColumnBase::Display_Class },
|
||||||
{ CSMWorld::UniversalId::Type_Class, CSMWorld::ColumnBase::Display_Class },
|
|
||||||
{ CSMWorld::UniversalId::Type_Faction, CSMWorld::ColumnBase::Display_Faction },
|
{ CSMWorld::UniversalId::Type_Faction, CSMWorld::ColumnBase::Display_Faction },
|
||||||
{ CSMWorld::UniversalId::Type_Sound, CSMWorld::ColumnBase::Display_Sound },
|
{ CSMWorld::UniversalId::Type_Sound, CSMWorld::ColumnBase::Display_Sound },
|
||||||
{ CSMWorld::UniversalId::Type_Region, CSMWorld::ColumnBase::Display_Region },
|
{ CSMWorld::UniversalId::Type_Region, CSMWorld::ColumnBase::Display_Region },
|
||||||
|
@ -59,8 +59,8 @@ namespace CSMWorld
|
|||||||
|
|
||||||
static CSMWorld::ColumnBase::Display convertEnums(CSMWorld::UniversalId::Type type);
|
static CSMWorld::ColumnBase::Display convertEnums(CSMWorld::UniversalId::Type type);
|
||||||
|
|
||||||
|
static bool isReferencable(CSMWorld::UniversalId::Type type);
|
||||||
private:
|
private:
|
||||||
bool isReferencable(CSMWorld::UniversalId::Type type) const;
|
|
||||||
bool isReferencable(CSMWorld::ColumnBase::Display type) const;
|
bool isReferencable(CSMWorld::ColumnBase::Display type) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -111,14 +111,21 @@ void CSVWorld::TableSubView::createFilterRequest (std::vector< CSMWorld::Univers
|
|||||||
{
|
{
|
||||||
std::vector<std::pair<std::string, std::vector<std::string> > > filterSource;
|
std::vector<std::pair<std::string, std::vector<std::string> > > filterSource;
|
||||||
|
|
||||||
|
std::vector<std::string> refIdColumns = mTable->getColumnsWithDisplay(CSMWorld::TableMimeData::convertEnums(CSMWorld::UniversalId::Type_Referenceable));
|
||||||
|
bool hasRefIdDisplay = !refIdColumns.empty();
|
||||||
|
|
||||||
for (std::vector<CSMWorld::UniversalId>::iterator it(types.begin()); it != types.end(); ++it)
|
for (std::vector<CSMWorld::UniversalId>::iterator it(types.begin()); it != types.end(); ++it)
|
||||||
{
|
{
|
||||||
std::pair<std::string, std::vector<std::string> > pair( //splited long line
|
CSMWorld::UniversalId::Type type = it->getType();
|
||||||
std::make_pair(it->getId(), mTable->getColumnsWithDisplay(CSMWorld::TableMimeData::convertEnums(it->getType()))));
|
std::vector<std::string> col = mTable->getColumnsWithDisplay(CSMWorld::TableMimeData::convertEnums(type));
|
||||||
|
if(!col.empty())
|
||||||
if(!pair.second.empty())
|
|
||||||
{
|
{
|
||||||
filterSource.push_back(pair);
|
filterSource.push_back(std::make_pair(it->getId(), col));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(hasRefIdDisplay && CSMWorld::TableMimeData::isReferencable(type))
|
||||||
|
{
|
||||||
|
filterSource.push_back(std::make_pair(it->getId(), refIdColumns));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user