Gui: clean-up Selection API
Replace the int of the 'resolve' argument of several functions with a proper enum class. * This avoids the inconsistencies in client code where often true/false is passed when an int is expected * This avoids the use of magic numbers like 0, 1, 2 or the undocumented 3
This commit is contained in:
@@ -66,7 +66,7 @@ public:
|
||||
/* TRANSLATOR Gui::Dialog::DlgPropertyLink */
|
||||
|
||||
DlgPropertyLink::DlgPropertyLink(QWidget* parent)
|
||||
: QDialog(parent), SelectionObserver(false,0)
|
||||
: QDialog(parent), SelectionObserver(false, ResolveMode::NoResolve)
|
||||
, ui(new Ui_DlgPropertyLink)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
@@ -428,7 +428,7 @@ void DlgPropertyLink::attachObserver() {
|
||||
auto view = qobject_cast<Gui::PropertyView*>(p);
|
||||
if(view) {
|
||||
parentView = view;
|
||||
for(auto &sel : Gui::Selection().getCompleteSelection(0))
|
||||
for(auto &sel : Gui::Selection().getCompleteSelection(ResolveMode::NoResolve))
|
||||
savedSelections.emplace_back(sel.DocName, sel.FeatName, sel.SubName);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user