On 11/12/2013 11:33 PM, D M German wrote: > > I _think_ I found a bug in xournal: > > - create a new document > - resize the page so there is grey space around it > - place the mouse under the page (within the canvas) > - try to paste an image with ctrl-v > > it should crash.
Interesting: for me it doesn't crash but complains about (xournal:16950): GnomeCanvas-CRITICAL **: gnome_canvas_pixbuf_set_property: assertion `val >= 0.0' failed and produces evil display bugs as gnomecanvas attempts desperately to cope with a pixbuf scaled to negative width and height. Same when you paste further right than the page. In any case this is indeed a bug. A related misfeature is that pasting by clicking the toolbar button often places the image in the wrong location or on the wrong page: in continuous view mode, place the view to start at the top of page 2, click on the paste button to insert an image, the image ends up at very small scale at the bottom of page 1 (because its top-left corner gets placed at the click location i.e. under the paste button). The question is what the best behavior should be regarding scaling of pasted images -- right now they appear with upper-left corner at the click location, sized to 1 pixel = 1 pixel if that fits on the page, otherwise squished so they fit on the page (with the issue you pointed out when the click location is further right or down than the end of the page). Should the code be changed so that, if the cursor is well within (e.g. > 10 pixels from the edge) of both the canvas and the page's lower-right boundaries, then we insert at the cursor with scaling to fit the page as currently, and otherwise we paste at unit scale at an arbitrary location more or less centered on the viewport (not sure exactly how, but similar to the regular paste code for selection items) ? Further comments or suggestions welcome. Won't have time to do this immediately, but within the next week or two I should be able to get to it -- pretty high priority, as usual for bugs. Denis ------------------------------------------------------------------------------ DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk _______________________________________________ Xournal-devel mailing list Xournal-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xournal-devel