landam / grass-gis-git-migration-test

0 stars 0 forks source link

wxGUI module dialogs should provide "reset to default value" for each of parameters #105

Open landam opened 5 years ago

landam commented 5 years ago

Reported by marisn on 1 Mar 2014 12:21 UTC Some of autogenerated module dialog input options contain their default value. Current implementation has two downsides:

Potential solution: Autogenerate a button for each of input fields "reset to default". If default value is not specified, it should just clear the input field. If the default value is provided, it should just reset to default value. In both of cases it should remove parameter from module parameter list.

Steps to reproduce: run g.region, change cols or rows parameter, change your mind and try to NOT provide cols or rows parameter. In current wxGUI form it is NOT possible to NOT use cols or rows parameter as soon as you have touched those input controls.

Migrated-From: https://trac.osgeo.org/grass/ticket/2203

landam commented 5 years ago

Comment by annakrat on 1 Mar 2014 18:20 UTC Replying to [ticket:2203 marisn]:

Some of autogenerated module dialog input options contain their default value. Current implementation has two downsides:

  • there is no way how to get back "default" value if it has been changed (a wish for a new feature)
  • once value has been changed, it gets added to the command parameters list (nice). The problem - if it's a number field (represented by a spiner control), there is no way how to remove it from the module parameter list (a bug)

Potential solution: Autogenerate a button for each of input fields "reset to default". If default value is not specified, it should just clear the input field. If the default value is provided, it should just reset to default value. In both of cases it should remove parameter from module parameter list.

In my opinion, the dialog would be too cluttered with all these buttons and we can't use for example context menu because we want to keep the system context menu. There could be one button to reset all fields but this probably doesn't make any sense.

Steps to reproduce: run g.region, change cols or rows parameter, change your mind and try to NOT provide cols or rows parameter. In current wxGUI form it is NOT possible to NOT use cols or rows parameter as soon as you have touched those input controls.

There is already https://trac.osgeo.org/grass/ticket/1048, so let's keep discussion on this g.region problem there.

landam commented 5 years ago

Comment by mlennert on 3 Mar 2016 12:14 UTC Replying to [comment:1 annakrat]:

Replying to [ticket:2203 marisn]:

Some of autogenerated module dialog input options contain their default value. Current implementation has two downsides:

  • there is no way how to get back "default" value if it has been changed (a wish for a new feature)
  • once value has been changed, it gets added to the command parameters list (nice). The problem - if it's a number field (represented by a spiner control), there is no way how to remove it from the module parameter list (a bug)

Potential solution: Autogenerate a button for each of input fields "reset to default". If default value is not specified, it should just clear the input field. If the default value is provided, it should just reset to default value. In both of cases it should remove parameter from module parameter list.

In my opinion, the dialog would be too cluttered with all these buttons and we can't use for example context menu because we want to keep the system context menu. There could be one button to reset all fields but this probably doesn't make any sense.

I've very little knowledge of wx and am just brainstorming here, but I see that spin.ctrl has an option 'initial='. Couldn't this be set to some specific value (e.g. -1) and the parser interpret this value to mean that this parameter should be ignored ?

landam commented 5 years ago

Comment by annakrat on 6 Mar 2016 01:23 UTC Replying to [comment:2 mlennert]:

I've very little knowledge of wx and am just brainstorming here, but I see that spin.ctrl has an option 'initial='. Couldn't this be set to some specific value (e.g. -1) and the parser interpret this value to mean that this parameter should be ignored ?

This seems unnecessary complicated. The easiest solution is to use wx.TextCtrl instead of wx.SpinCtrl.

landam commented 5 years ago

Modified by @landam on 12 May 2016 06:43 UTC

landam commented 5 years ago

Modified by @landam on 25 Aug 2016 15:51 UTC

landam commented 5 years ago

Comment by @landam on 27 Aug 2016 13:42 UTC Milestone renamed

landam commented 5 years ago

Comment by neteler on 26 Jan 2018 11:40 UTC Ticket retargeted after milestone closed

landam commented 5 years ago

Modified by neteler on 12 Jun 2018 20:48 UTC

landam commented 5 years ago

Comment by @landam on 25 Sep 2018 16:51 UTC All enhancement tickets should be assigned to 7.6 milestone.

landam commented 5 years ago

Comment by @landam on 25 Jan 2019 21:07 UTC Ticket retargeted after milestone closed