Delete button in Configure Formatting Tags gets focus

Bug #1197659 reported by Phill
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenLP
Status tracked in Trunk
2.0
Fix Released
Low
Phill
Trunk
Invalid
Low
Tim Bentley

Bug Description

http://support.openlp.org/issues/2005

When adding a new formatting tag, the delete button gets focus. It seems like the Save button should get focus instead.

How to reproduce.
Open "Configure Formatting Tags" dialog.
Click new.
Click in one of the line edits (Delete button gets focus)
Change the text
Press enter (I would assume that this would save the new tag)
New tag gets deleted

Related branches

Revision history for this message
Tim Bentley (trb143) wrote :

This is working as expected.
Create a new tag, it is selected and the only valid option is delete so that is selected.

If not then the focus needs to be moved to the edit fields and if so which one. The row has been saved so save is not valid.

Revision history for this message
Phill (phill-ridout) wrote :

Tim I agree with your first statement.

However when the user makes a change to one of the fields, to me, pressing enter is the logical thing to do to save.

When the user changes one of the line edits, the save button becomes enabled. Perhaps the save button should also get focus?

Revision history for this message
Tim Bentley (trb143) wrote :

If you set the focus to the button you cannot edit but then when you press enter the delete still runs.
The problem is in the setting of default and autodefault

Default property

If this is set true, the button will be a default button.
If Enter is pressed on the dialog, than this button will be pressed, except when the focus is on an autoDefault button.

There should be only one default button. If you add more then the last one added will be the default button.

AutoDefault property

If this is set true, the button will be an autoDefault button.
If Enter is pressed on the dialog, than this button will be pressed if the focus is on it.

If the focus is not on an autoDefault button and there is no default button than the next autoDefault button will be pressed for Enter.

I propose we use setDefault. When save is enabled that has default otherwise delete has default.

Revision history for this message
Phill (phill-ridout) wrote :

I've marked this invalid as this dialoge has been rewritten

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.