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 @@ static ParameterGrp::handle _GetParam() {
|
||||
* in two tabs.
|
||||
*/
|
||||
PropertyView::PropertyView(QWidget *parent)
|
||||
: QWidget(parent), SelectionObserver(false, 0)
|
||||
: QWidget(parent), SelectionObserver(false, ResolveMode::NoResolve)
|
||||
{
|
||||
QGridLayout* pLayout = new QGridLayout( this );
|
||||
pLayout->setSpacing(0);
|
||||
@@ -298,7 +298,7 @@ void PropertyView::checkEnable(const char *doc) {
|
||||
}
|
||||
// check if at least one selected object is part of the active document
|
||||
setEnabled(!Selection().hasSelection()
|
||||
|| Selection().hasSelection(doc,false));
|
||||
|| Selection().hasSelection(doc, ResolveMode::NoResolve));
|
||||
}
|
||||
|
||||
struct PropertyView::PropInfo
|
||||
|
||||
Reference in New Issue
Block a user