1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-21 12:53:51 +00:00

Add ability to invert selection.

This commit is contained in:
Aesylwinn 2016-05-16 17:03:00 -04:00
parent 55656d68ef
commit 8b6cb73369
5 changed files with 24 additions and 0 deletions

View file

@ -606,6 +606,15 @@ void CSVRender::PagedWorldspaceWidget::clearSelection (int elementMask)
flagAsModified(); 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) void CSVRender::PagedWorldspaceWidget::selectAll (int elementMask)
{ {
for (std::map<CSMWorld::CellCoordinates, Cell *>::iterator iter = mCells.begin(); for (std::map<CSMWorld::CellCoordinates, Cell *>::iterator iter = mCells.begin();

View file

@ -107,6 +107,9 @@ namespace CSVRender
/// \param elementMask Elements to be affected by the clear operation /// \param elementMask Elements to be affected by the clear operation
virtual void clearSelection (int elementMask); 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 /// \param elementMask Elements to be affected by the select operation
virtual void selectAll (int elementMask); virtual void selectAll (int elementMask);

View file

@ -104,6 +104,12 @@ void CSVRender::UnpagedWorldspaceWidget::clearSelection (int elementMask)
flagAsModified(); flagAsModified();
} }
void CSVRender::UnpagedWorldspaceWidget::invertSelection (int elementMask)
{
mCell->setSelection (elementMask, Cell::Selection_Invert);
flagAsModified();
}
void CSVRender::UnpagedWorldspaceWidget::selectAll (int elementMask) void CSVRender::UnpagedWorldspaceWidget::selectAll (int elementMask)
{ {
mCell->setSelection (elementMask, Cell::Selection_All); mCell->setSelection (elementMask, Cell::Selection_All);

View file

@ -47,6 +47,9 @@ namespace CSVRender
/// \param elementMask Elements to be affected by the clear operation /// \param elementMask Elements to be affected by the clear operation
virtual void clearSelection (int elementMask); 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 /// \param elementMask Elements to be affected by the select operation
virtual void selectAll (int elementMask); virtual void selectAll (int elementMask);

View file

@ -136,6 +136,9 @@ namespace CSVRender
/// \param elementMask Elements to be affected by the clear operation /// \param elementMask Elements to be affected by the clear operation
virtual void clearSelection (int elementMask) = 0; 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 /// \param elementMask Elements to be affected by the select operation
virtual void selectAll (int elementMask) = 0; virtual void selectAll (int elementMask) = 0;