Opened 15 months ago

Closed 15 months ago

Last modified 15 months 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 15 months 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 Changed 15 months ago by Peter Bennett

Owner: changed from stuartm to Peter Bennett
Status: newaccepted

Changed 15 months ago by Peter Bennett

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

comment:2 Changed 15 months ago by Peter Bennett

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 Changed 15 months ago by jpoet

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 Changed 15 months ago by Peter Bennett

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 Changed 15 months ago by jpoet

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 Changed 15 months ago by Peter Bennett

comment:7 Changed 15 months ago by Peter Bennett <pbennett@…>

Resolution: fixed
Status: acceptedclosed

In dc0755bbd/mythtv:

MythGUI: Change spinbox entry dialog to only appear for numeric spin boxes

The popup entry dialog is really only intended for entry of numeric values
when there is a huge range. The popup with alphabetic entry is interfering
with custom record. It was not useful anyway so will be disabled.

Fixes #13318

comment:8 Changed 15 months ago by Peter Bennett <pbennett@…>

In dde16d475/mythtv:

MythGUI: Change spinbox entry dialog to only appear for numeric spin boxes

The popup entry dialog is really only intended for entry of numeric values
when there is a huge range. The popup with alphabetic entry is interfering
with custom record. It was not useful anyway so will be disabled.

Fixes #13318

(cherry picked from commit dc0755bbd656cedff4a0af21919306ef3019e593)

Note: See TracTickets for help on using tickets.