Fix selection issues with visual tools

Originally committed to SVN as r4622.
This commit is contained in:
Thomas Goyne 2010-06-27 07:53:25 +00:00
parent 7f7771bcdc
commit 75d9ecd14a
2 changed files with 5 additions and 2 deletions

View File

@ -238,7 +238,9 @@ void BaseGrid::SelectRow(int row, bool addToSelected, bool select) {
if (!addToSelected) {
Selection old_selection(selection);
selection.clear();
selection.insert(line);
if (select) {
selection.insert(line);
}
AnnounceSelectedSetChanged(selection, old_selection);
}

View File

@ -382,7 +382,8 @@ wxArrayInt VisualTool<FeatureType>::GetSelection() {
template<class FeatureType>
void VisualTool<FeatureType>::ClearSelection(bool hard) {
if (hard) {
VideoContext::Get()->grid->SelectRow(0, false, false);
Selection sel;
VideoContext::Get()->grid->SetSelectedSet(sel);
}
selFeatures.clear();
lineSelCount.clear();