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

[layouts] Copy/paste, templates, etc #5794

Merged
merged 34 commits into from
Dec 6, 2017
Merged

Conversation

nyalldawson
Copy link
Collaborator

Next instalment in layouts work - porting and improving item copy/paste, template handling, serialization

End user highlights:

  • right click context menu entries for cutting/copying, and pasting items
  • "copy" and "delete" actions in right click menu for layout item panel
  • support drag and drop of QPT templates onto layout windows to add items from template to the layout

...getting close now!

@nyalldawson nyalldawson closed this Dec 4, 2017
@nyalldawson nyalldawson reopened this Dec 4, 2017
@nyalldawson nyalldawson force-pushed the layout_next2 branch 3 times, most recently from 5cf7e73 to 1b3f2be Compare December 5, 2017 03:16
@nirvn
Copy link
Contributor

nirvn commented Dec 5, 2017

@nyalldawson , testing this, I get a crasher when creating a layout in the layout manager, closing the layout, and subsequently re-opening the layout via the manager.

Steps to reproduce

  • Open the layout manager
  • Create a new layout
  • Add a label item in the newly created layout
  • Close the layout
  • In the layout manager, select the previously opened layout, and re-open it using the [ show ] button
  • boom QGIS dies

Here's the gdb output:

#0  0x00007ffff549e140 in QGraphicsView::transform() const () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#1  0x00007ffff19525a9 in QgsLayoutMouseHandles::rectHandlerBorderTolerance() (this=0x55555e760790)
    at /home/webmaster/dev/cpp/QGIS/src/gui/layout/qgslayoutmousehandles.cpp:316
#2  0x00007ffff1950be7 in QgsLayoutMouseHandles::paint(QPainter*, QStyleOptionGraphicsItem const*, QWidget*) (this=0x55555e760790, painter=0x7fffffffba70, itemStyle=0x55555e625ee8, pWidget=0x55555e7839c0)
    at /home/webmaster/dev/cpp/QGIS/src/gui/layout/qgslayoutmousehandles.cpp:69
#3  0x00007ffff5483cb6 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#4  0x00007ffff54842c8 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#5  0x00007ffff5484aba in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#6  0x00007ffff54a7716 in QGraphicsView::paintEvent(QPaintEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#7  0x00007ffff51bbdc8 in QWidget::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8  0x00007ffff529b2de in QFrame::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#9  0x00007ffff54a624b in QGraphicsView::viewportEvent(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007ffff4400acc in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007ffff517b445 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007ffff5182d34 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ffff5f06807 in QgsApplication::notify(QObject*, QEvent*) (this=0x7fffffffda70, receiver=0x55555e7839c0, event=0x7fffffffc060)
    at /home/webmaster/dev/cpp/QGIS/src/core/qgsapplication.cpp:317

@nirvn
Copy link
Contributor

nirvn commented Dec 5, 2017

@nyalldawson , great job as always.

Regarding the right-click menu paste action, IMHO, the item should be pasted at the location the user right-clicked, not at the location the user left-clicked on the "Paste" menu item.

@nyalldawson
Copy link
Collaborator Author

@nirvn

, testing this, I get a crasher when creating a layout in the layout manager, closing the layout, and subsequently re-opening the layout via the manager.

Thanks, fixed

@nyalldawson
Copy link
Collaborator Author

Regarding the right-click menu paste action, IMHO, the item should be pasted at the location the user right-clicked, not at the location the user left-clicked on the "Paste" menu item.

Fixed

@nyalldawson nyalldawson merged commit a12673c into qgis:master Dec 6, 2017
@nyalldawson nyalldawson deleted the layout_next2 branch December 6, 2017 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants