forked from teamnwah/openmw-tes3coop
Add ability to invert selection.
This commit is contained in:
parent
55656d68ef
commit
8b6cb73369
5 changed files with 24 additions and 0 deletions
|
@ -606,6 +606,15 @@ void CSVRender::PagedWorldspaceWidget::clearSelection (int elementMask)
|
|||
flagAsModified();
|
||||
}
|
||||
|
||||
void CSVRender::PagedWorldspaceWidget::invertSelection (int elementMask)
|
||||
{
|
||||
for (std::map<CSMWorld::CellCoordinates, Cell *>::iterator iter = mCells.begin();
|
||||
iter!=mCells.end(); ++iter)
|
||||
iter->second->setSelection (elementMask, Cell::Selection_Invert);
|
||||
|
||||
flagAsModified();
|
||||
}
|
||||
|
||||
void CSVRender::PagedWorldspaceWidget::selectAll (int elementMask)
|
||||
{
|
||||
for (std::map<CSMWorld::CellCoordinates, Cell *>::iterator iter = mCells.begin();
|
||||
|
|
|
@ -107,6 +107,9 @@ namespace CSVRender
|
|||
/// \param elementMask Elements to be affected by the clear operation
|
||||
virtual void clearSelection (int elementMask);
|
||||
|
||||
/// \param elementMask Elements to be affected by the select operation
|
||||
virtual void invertSelection (int elementMask);
|
||||
|
||||
/// \param elementMask Elements to be affected by the select operation
|
||||
virtual void selectAll (int elementMask);
|
||||
|
||||
|
|
|
@ -104,6 +104,12 @@ void CSVRender::UnpagedWorldspaceWidget::clearSelection (int elementMask)
|
|||
flagAsModified();
|
||||
}
|
||||
|
||||
void CSVRender::UnpagedWorldspaceWidget::invertSelection (int elementMask)
|
||||
{
|
||||
mCell->setSelection (elementMask, Cell::Selection_Invert);
|
||||
flagAsModified();
|
||||
}
|
||||
|
||||
void CSVRender::UnpagedWorldspaceWidget::selectAll (int elementMask)
|
||||
{
|
||||
mCell->setSelection (elementMask, Cell::Selection_All);
|
||||
|
|
|
@ -47,6 +47,9 @@ namespace CSVRender
|
|||
/// \param elementMask Elements to be affected by the clear operation
|
||||
virtual void clearSelection (int elementMask);
|
||||
|
||||
/// \param elementMask Elements to be affected by the select operation
|
||||
virtual void invertSelection (int elementMask);
|
||||
|
||||
/// \param elementMask Elements to be affected by the select operation
|
||||
virtual void selectAll (int elementMask);
|
||||
|
||||
|
|
|
@ -136,6 +136,9 @@ namespace CSVRender
|
|||
/// \param elementMask Elements to be affected by the clear operation
|
||||
virtual void clearSelection (int elementMask) = 0;
|
||||
|
||||
/// \param elementMask Elements to be affected by the select operation
|
||||
virtual void invertSelection (int elementMask) = 0;
|
||||
|
||||
/// \param elementMask Elements to be affected by the select operation
|
||||
virtual void selectAll (int elementMask) = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue