Non-multipage frames with names are all blank

The issues found when using the Virtual Console
Post Reply
mdmayfield
Posts: 71
Joined: Wed Jun 15, 2016 8:51 am
Real Name: Matt Mayfield

In the latest Git sources, something in the (very useful!) page-shortcuts update by Siegmund42 seems to have broken the display of single-page frame captions. To reproduce:

1) Create a frame in the VC
2) Double-click it and give it a name. Click OK
--> Expected behavior: name appears on the title bar of the frame
--> Actual behavior: title bar of the frame remains blank

I started a potential fix for this here: https://github.com/mdmayfield/qlcplus/c ... 6ff429fe26

However, there is still one remaining small issue when I apply this patch and build. To reproduce:

1) Create a frame
2) Double-click it, give it the name "Caption", click OK
--> Frame name "Caption" displays properly now
3) Double-click the frame, turn on Multipage mode, click OK
--> Frame now has "Caption - Page Name" caption as expected
4) Double-click the frame, turn OFF Multipage mode, click OK
--> Frame keeps the (now incorrect) "Caption - Page Name" caption
5) Double-click the frame, make no changes, click OK
--> Frame displays (now correct) "Caption"
siegmund
Posts: 703
Joined: Mon Nov 02, 2015 11:03 am
Location: Germany
Real Name: Lukas

Good catch! This is because the caption is set before the multipage mode is set.
So a fix could be to change position of setting multipage mode.
mdmayfield
Posts: 71
Joined: Wed Jun 15, 2016 8:51 am
Real Name: Matt Mayfield

Great, thanks! I'd like to fix this in the way you suggest, as a coding exercise for myself, when I have some more time.

May I ask a Git question? I created a branch for "display-nonpaged-frame-names" and committed my first version of a fix (not yet optimal). Now I want to try updating the order of setting caption vs. multipage mode.

If I revert the original changes I made, then make new changes, my "display-nonpaged-frame-names" branch's commit history will include a commit, a revert, and another commit. Is this a case where I want to make yet another branch, then only commit fresh changes, to have a clean history before doing a pull request? Is there any simpler way to ensure a clean history?

Thanks,

Matt
siegmund
Posts: 703
Joined: Mon Nov 02, 2015 11:03 am
Location: Germany
Real Name: Lukas

Why reverting? If you finalize the fix, it should be okay to add a new commit doing the latest work.
Anyway, you can do

Code: Select all

git reset [<mode>] [<commit>] 
Read about the command here: https://git-scm.com/docs/git-reset#git- ... ltcommitgt
Be careful with this - it may discard all your changes when using --hard mode (which you most probably want to use)!
After that, you need to force a push.

To all of this there is plenty of documentation available online from people, who have way better github knowledge than me.
Post Reply