Ticket #7720 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Problem with boolean properties and GUI

Reported by: Nick Draper Owned by: Arturs Bekasovs
Priority: critical Milestone: Release 2.6.1
Component: GUI Keywords: PatchCandidate
Cc: campbellsi@…, reuterma@…, petersonpf@… Blocked By:
Blocking: #7744 Tester: Michael Reuter

Description

From Michael Reuter:

I have isolated the offending change to work done in this ticket: http://trac.mantidproject.org/mantid/ticket/7441. The following code seems to be the issue:

void AlgorithmDialog::setPreviousValue(QWidget* widget, const QString& propName) {

QString value = getPreviousValue(propName);

if(value.isEmpty())

return;

...

This seems to assume that all algorithms have been run previously. This is clearly not the case for a fresh Mantid version or if you've just never run the algorithm before. This has the effect on the checkboxes that are supposed to have default true values that they are never marked as checked since setValue is not called further down. Reestablishing the old logic breaks the change intended for the ticket. This needs to be rethought and redone.

M

On 08/08/2013 03:14 PM, Campbell, Stuart I. wrote: Hi,

Has anyone else noticed that if you have a clean configuration (I.e. A blank ~/.config/Mantid) and you run any algorithm that has a boolean property with a default of true (e.g. LoadEventNexus) that the algorithm GUI doesn't not show this property as checked.

Cheers Stu

-- Dr Stuart Campbell Neutron Data Analysis and Visualisation Division Oak Ridge National Laboratory 1 Bethel Valley Road, PO Box 2008 Oak Ridge, TN 37831-6475, USA

mobile: +1-865-360-6733 email: campbellsi@…<mailto:campbellsi@…>

Change History

comment:1 Changed 7 years ago by Nick Draper

  • Keywords PatchCandidate added
  • Milestone changed from Release 3.0 to Release 2.6.1

comment:2 Changed 7 years ago by Peter Peterson

  • Cc campbellsi@…, reuterma@…, petersonpf@… added

comment:3 Changed 7 years ago by Arturs Bekasovs

  • Status changed from new to inprogress
  • type changed from enhancement to defect

comment:4 Changed 7 years ago by Arturs Bekasovs

Return the old logic.

Refs #7720

Changeset: 9b2e6e889efbd5c1d293a10244aa919d0c42f472

comment:5 Changed 7 years ago by Arturs Bekasovs

Tester:

  1. Delete the MantidPlot configuration file. (~/.config/Mantid/MantidPlot.conf on Ubuntu) It will reset all your configuration and erase history.
  2. Run the MantidPlot.
  3. Run the LoadEventNexus. Only LoadLogs checkbox should be checked, as it's default value is true.
  4. Try some other algorithms and make sure their default values are respected.

comment:6 Changed 7 years ago by Arturs Bekasovs

Waiting for inc tests to finish. Will mark the ticket fixed as soon as it happens.

Last edited 7 years ago by Arturs Bekasovs (previous) (diff)

comment:7 Changed 7 years ago by Arturs Bekasovs

Forgot to publish my branch before going home, so will do it in the first place Monday morning.

comment:8 Changed 7 years ago by Arturs Bekasovs

Return the old logic.

Refs #7720

Changeset: 9b2e6e889efbd5c1d293a10244aa919d0c42f472

comment:9 Changed 7 years ago by Arturs Bekasovs

Fixed the bug with SmoothNeighbours happening when there are no suitable workspaces.

Refs #7720

Changeset: fc18abacf1447feac882d99b0e432c0f8e406893

comment:10 Changed 7 years ago by Arturs Bekasovs

While re-testing I've found another problem with SmoothNeighbours introduced in the #7441.

So please test another thing in this one as well:

  1. Delete the MantidPlot configuration file.
  2. Run MantidPlot.
  3. Run SmoothNeighbours (it is crucial that you don't have any workspaces loaded). Make sure that no exception is thrown.
  4. Try inputting some invalid values to the input workspace field, and make sure the dialog is not accepting any of them.

comment:11 Changed 7 years ago by Arturs Bekasovs

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

comment:12 Changed 7 years ago by Michael Reuter

  • Status changed from verify to verifying
  • Tester set to Michael Reuter

comment:13 Changed 7 years ago by Michael Reuter

  • Status changed from verifying to reopened
  • Resolution fixed deleted

SmoothNeighbors works as expected. The autogenerated dialogs run via the Algorithm launcher all look to be OK. I also ran some custom interfaces and custom dialogs and everything checked out OK. The last check, running LoadEventNexusDialog from the script interpreter window did not work. The LoadLogs button is not checked. The old logic wasn't quite put back all the way.

comment:14 Changed 7 years ago by Arturs Bekasovs

Running MantidPlot v2.5.3 has shown that the old logic had the same problem with running algorithm dialogs from script interpreter. I've run LoadEventNexusDialog from script interpreter in 2.5.3 and LoadLogs was not checked.

I will look into solving that, but it looks like it wasn't introduced by changes in #7441 or this ticket.

comment:15 Changed 7 years ago by Michael Reuter

Nice investigative work. Open a new ticket on that issue and return this one to verify state so I can close it as everything else has already passed.

comment:16 Changed 7 years ago by Arturs Bekasovs

  • Status changed from reopened to inprogress

Return the old logic.

Refs #7720 (cherry picked from commit 9b2e6e889efbd5c1d293a10244aa919d0c42f472)

Changeset: 998ed6f0487f0997d38ea241d2fa53c01162d120

comment:17 Changed 7 years ago by Arturs Bekasovs

Return the old logic.

Refs #7720 (cherry picked from commit 9b2e6e889efbd5c1d293a10244aa919d0c42f472)

Changeset: 5871b0130e98d2039a0fecaa63bdb62f30c25d8b

comment:18 Changed 7 years ago by Arturs Bekasovs

Fixed the bug with SmoothNeighbours happening when there are no suitable workspaces.

Refs #7720 (cherry picked from commit fc18abacf1447feac882d99b0e432c0f8e406893)

Changeset: 22a794de22d092253adcac8bd9a68ef348fad8c9

comment:19 Changed 7 years ago by Arturs Bekasovs

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

Created #7744 to solve the remaining problem.

comment:20 Changed 7 years ago by Arturs Bekasovs

  • Blocking 7744 added

comment:21 Changed 7 years ago by Michael Reuter

  • Status changed from verify to closed

Merge remote-tracking branch 'origin/bugfix/7720_gui_prop_use_default'

comment:22 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8565

Note: See TracTickets for help on using tickets.