forked from teamnwah/openmw-tes3coop
changed edit requests from row index format to UniversalId/hint format
This commit is contained in:
parent
797f5527ee
commit
55195f819a
7 changed files with 11 additions and 10 deletions
|
@ -45,7 +45,7 @@ namespace CSVDoc
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
void focusId (const CSMWorld::UniversalId& universalId);
|
void focusId (const CSMWorld::UniversalId& universalId, const std::string& hint);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -329,8 +329,8 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id, const std::strin
|
||||||
|
|
||||||
mSubViewWindow.addDockWidget (Qt::TopDockWidgetArea, view);
|
mSubViewWindow.addDockWidget (Qt::TopDockWidgetArea, view);
|
||||||
|
|
||||||
connect (view, SIGNAL (focusId (const CSMWorld::UniversalId&)), this,
|
connect (view, SIGNAL (focusId (const CSMWorld::UniversalId&, const std::string&)), this,
|
||||||
SLOT (addSubView (const CSMWorld::UniversalId&)));
|
SLOT (addSubView (const CSMWorld::UniversalId&, const std::string&)));
|
||||||
|
|
||||||
CSMSettings::UserSettings::instance().updateSettings("Display Format");
|
CSMSettings::UserSettings::instance().updateSettings("Display Format");
|
||||||
|
|
||||||
|
|
|
@ -40,5 +40,5 @@ void CSVTools::ReportSubView::updateEditorSetting (const QString& key, const QSt
|
||||||
|
|
||||||
void CSVTools::ReportSubView::show (const QModelIndex& index)
|
void CSVTools::ReportSubView::show (const QModelIndex& index)
|
||||||
{
|
{
|
||||||
focusId (mModel->getUniversalId (index.row()));
|
focusId (mModel->getUniversalId (index.row()), "");
|
||||||
}
|
}
|
|
@ -306,7 +306,7 @@ void CSVWorld::Table::editRecord()
|
||||||
QModelIndexList selectedRows = selectionModel()->selectedRows();
|
QModelIndexList selectedRows = selectionModel()->selectedRows();
|
||||||
|
|
||||||
if (selectedRows.size()==1)
|
if (selectedRows.size()==1)
|
||||||
emit editRequest (selectedRows.begin()->row());
|
emit editRequest (getUniversalId (selectedRows.begin()->row()), "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ namespace CSVWorld
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
void editRequest (int row);
|
void editRequest (const CSMWorld::UniversalId& id, const std::string& hint);
|
||||||
|
|
||||||
void selectionSizeChanged (int size);
|
void selectionSizeChanged (int size);
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,8 @@ CSVWorld::TableSubView::TableSubView (const CSMWorld::UniversalId& id, CSMDoc::D
|
||||||
|
|
||||||
setWidget (widget);
|
setWidget (widget);
|
||||||
|
|
||||||
connect (mTable, SIGNAL (editRequest (int)), this, SLOT (editRequest (int)));
|
connect (mTable, SIGNAL (editRequest (const CSMWorld::UniversalId&, const std::string&)),
|
||||||
|
this, SLOT (editRequest (const CSMWorld::UniversalId&, const std::string&)));
|
||||||
|
|
||||||
connect (mTable, SIGNAL (selectionSizeChanged (int)),
|
connect (mTable, SIGNAL (selectionSizeChanged (int)),
|
||||||
mBottom, SLOT (selectionSizeChanged (int)));
|
mBottom, SLOT (selectionSizeChanged (int)));
|
||||||
|
@ -81,9 +82,9 @@ void CSVWorld::TableSubView::setEditLock (bool locked)
|
||||||
mBottom->setEditLock (locked);
|
mBottom->setEditLock (locked);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVWorld::TableSubView::editRequest (int row)
|
void CSVWorld::TableSubView::editRequest (const CSMWorld::UniversalId& id, const std::string& hint)
|
||||||
{
|
{
|
||||||
focusId (mTable->getUniversalId (row));
|
focusId (id, hint);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVWorld::TableSubView::updateEditorSetting(const QString &settingName, const QString &settingValue)
|
void CSVWorld::TableSubView::updateEditorSetting(const QString &settingName, const QString &settingValue)
|
||||||
|
|
|
@ -53,7 +53,7 @@ namespace CSVWorld
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
void editRequest (int row);
|
void editRequest (const CSMWorld::UniversalId& id, const std::string& hint);
|
||||||
void cloneRequest (const CSMWorld::UniversalId& toClone);
|
void cloneRequest (const CSMWorld::UniversalId& toClone);
|
||||||
void createFilterRequest(std::vector< CSMWorld::UniversalId >& types,
|
void createFilterRequest(std::vector< CSMWorld::UniversalId >& types,
|
||||||
Qt::DropAction action);
|
Qt::DropAction action);
|
||||||
|
|
Loading…
Reference in a new issue