Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13318 closed Bug Report - General (fixed)

spinbox click actions are ignored.

Reported by: jpoet Owned by: Peter Bennett
Priority: minor Milestone: 29.2
Component: MythTV - User Interface Library Version: v29.1
Severity: medium Keywords: spin box click
Cc: Ticket locked: no

Description

For example:

mythfrontend -> Manage Recordings -> Schedule Recordings -> Custom Record Choose a "Sample Clause" and then try to 'select' it. A dialog box will pop up saying "You may enter a value here or cancel to continue using the Spinbox". Choosing cancel or OK just results in it going back to the spinbox without the sample clause being copied to the "rule".

In CustomEdit::Create() a clicked action is connected to CustomEdit::clauseClicked, but that never gets executed.

I am guessing this was broken by 862e510f589e3fedb8f37b61ac7967a219b7d8f4 but have not verified it.

Attachments (1)

20180905_1816_ticket13318.patch (720 bytes ) - added by Peter Bennett 8 years ago.
Proposed fix - Only display the entry dialog if the spin box contains a numeric value. Otherwise pass the keystroke on.

Download all attachments as: .zip

Change History (9)

comment:1 by Peter Bennett, 8 years ago

Owner: changed from stuartm to Peter Bennett
Status: newaccepted

by Peter Bennett, 8 years ago

Proposed fix - Only display the entry dialog if the spin box contains a numeric value. Otherwise pass the keystroke on.

comment:2 by Peter Bennett, 8 years ago

Milestone: needs_triage29.2
Version: Master Headv29.1

Your guess is correct. Sorry for breaking it. Proposed fix herewith.

Workaround for before the fix is committed - a mouse click would still copy the clause if you have a mouse connected.

comment:3 by jpoet, 8 years ago

Thanks. That does fix the case I mentioned.

This patch does "break" the case where the spinbox is a mixture of digits and text:

Start Offset: "2 minutes late"

In a situation like this, with the number mixed with text, it would be nice if the cursor was automatically placed just after the number. I will look into that.

comment:4 by Peter Bennett, 8 years ago

The original intent was to help those who have a spinbox with a range of thousands, see #13204. Those with text are a bonus, but are not really 100% logical.

I could easily make it so that if it starts with a number, to allow the popup box. That would solve the example you give. However I wonder if in other language translations it may have the number in the middle or end.

It may be dangerous to allow the popup box for numbers anywhere in the message, because one of the sql strings in your original problem may have a number in it somewhere.

Another option is to provide a method in spinbox that the code can call, to turn off the popup option in cases where you want to use enter for another purpose.

There is a QT method that allows you to check if a slot has been attached to a signal, which we could use to check if "clicked" has a slot attached, but I could not understand how to use the method, and the example did not help.

comment:5 by jpoet, 8 years ago

The given patch seems reasonable given that explanation. Honestly, I can't imagine wanting to use the textedit dialog in a situation where there is a mixture of alphanumeric characters, anyway.

In my opinion, go with the proposed patch.

comment:6 by Peter Bennett, 8 years ago

comment:7 by Peter Bennett <pbennett@…>, 8 years ago

Resolution: fixed
Status: acceptedclosed

In dc0755bbd/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:8 by Peter Bennett <pbennett@…>, 8 years ago

In dde16d475/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available
Note: See TracTickets for help on using tickets.