Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show paper properties if clicked on a Layout Page #42572

Merged
merged 5 commits into from
Mar 31, 2021
Merged

Show paper properties if clicked on a Layout Page #42572

merged 5 commits into from
Mar 31, 2021

Conversation

rduivenvoorde
Copy link
Contributor

Currently the only way to see the current Page properties (most
notably the page orientation and size) is via a context menu.

In my experience several people failed to 'find' it.

See also: https://lists.osgeo.org/pipermail/qgis-developer/2021-March/063416.html
and #26237 (could be closed) and #25803

Took me some time to follow/understand all mouse pressed/move/released signals :-)
But I think this commit is a pretty clean solution?

Now if you click on a page the props will be shown (just like
if you use the context menu).

Currently the only way to see the current Page properties (most
notably the page orientation and size) is via a context menu.
In my experience several people failed to 'find' it.
Now if you click on a page the props will be shown (just like
if you use the context menu).
@github-actions github-actions bot added this to the 3.20.0 milestone Mar 30, 2021
Comment on lines 246 to 248
else
{
if ( paperItem )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't this be a single else if?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmm, probably yes, the loop is entered a couple of times, not sure why, but indeed this could be an else if

@roya0045
Copy link
Contributor

Does it work fine with multipages and when clicking in the void?

@roya0045
Copy link
Contributor

Though this seems to still require an empty spot to work. The proper solution may be to have a dedicated panel and have it change in a similar way as this, i.e.: the values changed depending on the position of the click, regardless of the widgets selected.

@rduivenvoorde
Copy link
Contributor Author

Does it work fine with multipages and when clicking in the void?

If you mean with 'multipages' a layout in which you added some pages via 'layout/Add Pages', then yes. To check: give your pages a different background color and after that click on them to see it change with you clicked page.
Clicking in the void cleans/empties he 'Item Properties'

Though this seems to still require an empty spot to work. The proper solution may be to have a dedicated panel and have it change in a similar way as this, i.e.: the values changed depending on the position of the click, regardless of the widgets selected.

I have thought about a dedicated panel, but this works just in exact the same way as when you use the context menu. And a 'QgsLayoutItemPage' is also a 'QgsLayoutItem', only difference is you do not see it 'selected' (and it does not show up in the 'selectedItemList'.

src/gui/layout/qgslayoutviewtoolselect.cpp Outdated Show resolved Hide resolved
src/gui/layout/qgslayoutviewtoolselect.cpp Outdated Show resolved Hide resolved
src/gui/layout/qgslayoutviewtoolselect.cpp Outdated Show resolved Hide resolved
@nyalldawson
Copy link
Collaborator

Sounds good to me. It's obviously an issue for some users, and we haven't seen any sponsorship yet to implement a proper "page manager" dock to handle this nicely.

rduivenvoorde and others added 2 commits March 31, 2021 08:01
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
@rduivenvoorde
Copy link
Contributor Author

Accepted your suggestions (indeed cleaner/nicer). Argh... used github for it... not checking code layout...

Sounds good to me. It's obviously an issue for some users, and we haven't seen any sponsorship yet to implement a proper "page manager" dock to handle this nicely.

I've been thinking about that too: a separate page tab, but as the old context menu also just reused the Item Properties, I thought to keep it like this: small and simple and working (for me :-)).

One thing: what is the meaning of the Layout/Page Setup menu? Because that is where people also try to change the page orientation and size...

@nyalldawson
Copy link
Collaborator

One thing: what is the meaning of the Layout/Page Setup menu? Because that is where people also try to change the page orientation and size...

it's for printer page setup. We could rename it as "Printer Setup" or "Printer Page Setup" maybe?

@rduivenvoorde
Copy link
Contributor Author

Mmm, code layout still failing, but running astyle and prepare_commit do not reveal anything?

@rduivenvoorde
Copy link
Contributor Author

One thing: what is the meaning of the Layout/Page Setup menu? Because that is where people also try to change the page orientation and size...

it's for printer page setup. We could rename it as "Printer Setup" or "Printer Page Setup" maybe?

Yep! Good idea! Will do

People sometimes tried to setup page orientation there in my experience.
This makes it more clear that it is only for printing pages.
@@ -1127,7 +1127,7 @@
</property>
</action>
<action name="mActionShowPage">
<property name="checkable">q
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently this 'q' was removed by QtDesigner/Creator?? Is that a vim-left over? Or did it really do something?

<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmmm... strange 'cleanup'?

@rduivenvoorde
Copy link
Contributor Author

I also tried to change the Dialog Title of the 'Page Setup', but that seems to be a Qt dialog.

@nyalldawson nyalldawson merged commit 52177cb into qgis:master Mar 31, 2021
@nyalldawson nyalldawson added the Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. label Mar 31, 2021
@github-actions
Copy link

@rduivenvoorde
This pull request has been tagged as requiring documentation.

A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged.

Please update the description (not the comments) with helpful description and screenshot to help the work from documentors.
Also, any commit having [needs-doc] or [Needs Documentation] in will see its message pushed to the issue, so please be as verbose as you can.

Thank you!

@github-actions
Copy link

@rduivenvoorde
A documentation ticket has been opened at qgis/QGIS-Documentation#6628
It is your responsibility to visit this ticket and add as much detail as possible for the documentation team to correctly document this change.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants