Gui: clean-up Selection API

Replace the int of the SubType of SelectionChanges with an enum class.
The meaning of it is nowhere documented and some magic numbers like 0,1,2 are used in several places in the code.
This commit is contained in:
wmayer
2022-04-09 23:07:02 +02:00
parent 27196375b4
commit c84c2fb6eb
6 changed files with 40 additions and 22 deletions

View File

@@ -487,7 +487,8 @@ void ElementColors::on_elementList_itemEntered(QListWidgetItem *item) {
}
Selection().setPreselect(d->editDoc.c_str(),
d->editObj.c_str(), (d->editSub+name).c_str(),0,0,0,
d->ui->onTop->isChecked()?2:1);
d->ui->onTop->isChecked() ? Gui::SelectionChanges::MsgSource::TreeView
: Gui::SelectionChanges::MsgSource::Internal);
}
void ElementColors::on_elementList_itemSelectionChanged() {