Ticket #8947 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Export EnabledWhenProperty to python

Reported by: Jose Borreguero Owned by: Martyn Gigg
Priority: major Milestone: Release 3.2
Component: Python Keywords:
Cc: Blocked By:
Blocking: Tester: Jose Borreguero

Description (last modified by Jose Borreguero) (diff)

Conditional property settings like EnabledWhenProperty and VisibleWhenProperty are not available to the PythonAlgorithm

Change History

comment:1 Changed 7 years ago by Jose Borreguero

  • Description modified (diff)

comment:2 Changed 7 years ago by Jose Borreguero

  • Description modified (diff)

comment:3 Changed 7 years ago by Jose Borreguero

  • Blocking 8778 added

comment:4 Changed 7 years ago by Jose Borreguero

  • Blocking 8778 removed

comment:5 Changed 7 years ago by Nick Draper

  • Status changed from new to assigned

Bulk move of tickets out of triage (new) to assigned at the introduction of the triage state

comment:6 Changed 7 years ago by Martyn Gigg

  • Status changed from assigned to inprogress

Export base IPropertySettings class to Python.

Refs #8947

Changeset: 198e7dc07054676e7e5a271e6f2e345e37e87ab7

comment:7 Changed 7 years ago by Martyn Gigg

Export EnabledWhenProperty to Python.

Refs #8947

Changeset: 5d3b45078f27dd0ac8ee71390b56ed26861ae3ca

comment:8 Changed 7 years ago by Martyn Gigg

Export setPropertySettings method on Python PropertyManager.

Refs #8947

Changeset: 10e967247f520b51630d3a175aa08ff033f798ac

comment:9 Changed 7 years ago by Martyn Gigg

Export VisibleWhenProperty to Python.

Refs #8947

Changeset: afc25adab9b474776881e5dec99dc2ed2af65678

comment:10 Changed 7 years ago by Martyn Gigg

  • Status changed from inprogress to verify
  • Resolution set to fixed

Branch: feature/8947_propertysettings_to_python

Tester: The following algorithm should present a GUI that when the PropOne's value is changed from the default PropTwo is disabled.

from mantid.kernel import *
from mantid.api import *

class DummyAlg(PythonAlgorithm):
            
    def PyInit(self):
        self.declareProperty("PropOne", 1)
        self.declareProperty("PropTwo", 2)
        settings = EnabledWhenProperty("PropOne",PropertyCriterion.IsDefault))
        self.setPropertySettings("PropTwo", settings)
            
    def PyExec(self):
        pass

AlgorithmFactory.subscribe(DummyAlg)

comment:11 Changed 7 years ago by Jose Borreguero

  • Status changed from verify to verifying
  • Tester set to Jose Borreguero

comment:12 Changed 7 years ago by Jose Borreguero

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/8947_propertysettings_to_python'

Full changeset: 229ac258b137879b97beb58a024dbe8c052691ab

comment:13 Changed 7 years ago by Jose Borreguero

Works as expected. Congratulations! :D

comment:14 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9790

Note: See TracTickets for help on using tickets.