mirror of https://github.com/odrling/Aegisub
Fix selection issues with visual tools
Originally committed to SVN as r4622.
This commit is contained in:
parent
7f7771bcdc
commit
75d9ecd14a
|
@ -238,7 +238,9 @@ void BaseGrid::SelectRow(int row, bool addToSelected, bool select) {
|
||||||
if (!addToSelected) {
|
if (!addToSelected) {
|
||||||
Selection old_selection(selection);
|
Selection old_selection(selection);
|
||||||
selection.clear();
|
selection.clear();
|
||||||
selection.insert(line);
|
if (select) {
|
||||||
|
selection.insert(line);
|
||||||
|
}
|
||||||
AnnounceSelectedSetChanged(selection, old_selection);
|
AnnounceSelectedSetChanged(selection, old_selection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -382,7 +382,8 @@ wxArrayInt VisualTool<FeatureType>::GetSelection() {
|
||||||
template<class FeatureType>
|
template<class FeatureType>
|
||||||
void VisualTool<FeatureType>::ClearSelection(bool hard) {
|
void VisualTool<FeatureType>::ClearSelection(bool hard) {
|
||||||
if (hard) {
|
if (hard) {
|
||||||
VideoContext::Get()->grid->SelectRow(0, false, false);
|
Selection sel;
|
||||||
|
VideoContext::Get()->grid->SetSelectedSet(sel);
|
||||||
}
|
}
|
||||||
selFeatures.clear();
|
selFeatures.clear();
|
||||||
lineSelCount.clear();
|
lineSelCount.clear();
|
||||||
|
|
Loading…
Reference in New Issue