mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 10:23:56 +00:00
Check the type of universal id before getting its id. Should resolve bug #2137
This commit is contained in:
parent
3028141815
commit
ede1b97b46
1 changed files with 7 additions and 2 deletions
|
@ -474,8 +474,13 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id, const std::strin
|
||||||
{
|
{
|
||||||
foreach(SubView *sb, mSubViews)
|
foreach(SubView *sb, mSubViews)
|
||||||
{
|
{
|
||||||
if((isReferenceable && (CSMWorld::UniversalId(CSMWorld::UniversalId::Type_Referenceable, id.getId()) == CSMWorld::UniversalId(CSMWorld::UniversalId::Type_Referenceable, sb->getUniversalId().getId())))
|
bool isSubViewReferenceable =
|
||||||
|| (!isReferenceable && (id == sb->getUniversalId())))
|
sb->getUniversalId().getType() == CSMWorld::UniversalId::Type_Referenceable;
|
||||||
|
|
||||||
|
if((isReferenceable && isSubViewReferenceable &&
|
||||||
|
id.getId() == sb->getUniversalId().getId())
|
||||||
|
||
|
||||||
|
(!isReferenceable && id == sb->getUniversalId()))
|
||||||
{
|
{
|
||||||
sb->setFocus(Qt::OtherFocusReason); // FIXME: focus not quite working
|
sb->setFocus(Qt::OtherFocusReason); // FIXME: focus not quite working
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue