change universalid of base subview after pressing next or prev

This commit is contained in:
Marek Kochanowicz 2014-03-12 13:04:40 +01:00
parent cb9bcc3cc1
commit 2e226e63b6
3 changed files with 13 additions and 1 deletions

View file

@ -18,4 +18,10 @@ void CSVDoc::SubView::updateEditorSetting (const QString &settingName, const QSt
void CSVDoc::SubView::setStatusBar (bool show) {}
void CSVDoc::SubView::useHint (const std::string& hint) {}
void CSVDoc::SubView::useHint (const std::string& hint) {}
void CSVDoc::SubView::setUniversalId (const CSMWorld::UniversalId& id)
{
mUniversalId = id;
setWindowTitle (mUniversalId.toString().c_str());
}

View file

@ -27,6 +27,8 @@ namespace CSVDoc
// not implemented
SubView (const SubView&);
SubView& operator= (SubView&);
protected:
void setUniversalId(const CSMWorld::UniversalId& id);
public:

View file

@ -391,6 +391,8 @@ void CSVWorld::DialogueSubView::prevId()
}
mEditWidget->remake(newRow);
setUniversalId(CSMWorld::UniversalId (static_cast<CSMWorld::UniversalId::Type> (mTable->data (mTable->index (newRow, 2)).toInt()),
mTable->data (mTable->index (newRow, 0)).toString().toStdString()));
mRow = newRow;
}
@ -410,6 +412,8 @@ void CSVWorld::DialogueSubView::nextId()
}
mEditWidget->remake(newRow);
setUniversalId(CSMWorld::UniversalId (static_cast<CSMWorld::UniversalId::Type> (mTable->data (mTable->index (newRow, 2)).toInt()),
mTable->data (mTable->index (newRow, 0)).toString().toStdString()));
mRow = newRow;
}