Ctrl+C increments the documents count

Bug #1022543 reported by jazzynico
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Maggio

Bug Description

Each time an object is added in the clipboard, the document count increases. Steps:
a. Open a new document with Ctrl+N.
b. The new document is labeled New document 2.
c. Create an object and copy it.
d. Open a new document with Ctrl+N.
e. The new document is labeled New document 4 (or 5 if you pressed Ctrl+C twice, and so on).

Reproduced on Windows XP, Inkscape 0.47, 0.48.3.1 and trunk revision 11533.
Not reproduced with 0.46 (old regression).

Tags: clipboard
jazzynico (jazzynico)
tags: added: clipboard
Changed in inkscape:
importance: Undecided → Low
Revision history for this message
rickmastfan67 (rickmastfan67) wrote :

I can reproduce this in Windows 7, Inkscape 0.48.3.1, as well.

Revision history for this message
su_v (suv-lp) wrote :

Reproduced with Inkscape 0.47, 0.48.2, 0.48.3.1 and 0.48+devel r11533 on OS X 10.7.4.
Not reproduced with Inkscape 0.46 on Mac OS X 10.5.8.

Changed in inkscape:
status: New → Confirmed
jazzynico (jazzynico)
Changed in inkscape:
status: Confirmed → Triaged
Revision history for this message
Maggio (dev-maggio) wrote :

Hello,

I have fixed this bug by adapting the creation of the name of document. A new static counter has been added for differentiate internal documents and user documents.

see the attachment.

Revision history for this message
Maggio (dev-maggio) wrote :

Each time an object is modified(Fill/Stroke,Gradient...), the document count increases. Steps:
a. Open a new document with Ctrl+N.
b. The new document is labeled New document 2.
c. Create an object and change stroke.
d. Open a new document with Ctrl+N.
e. The new document is labeled New document 4 (or 5 if you changed stroke twice, and so on).

This seconde patch fixe it:

Revision history for this message
jazzynico (jazzynico) wrote :

Tested on Debian testing, Inkscape trunk revision 12025.
The fix looks good, no regression found so far.

For convenience, here's an unified version of your patches.

Changed in inkscape:
assignee: nobody → Maggio (dev-maggio)
milestone: none → 0.49
status: Triaged → In Progress
Revision history for this message
jazzynico (jazzynico) wrote :
Revision history for this message
jazzynico (jazzynico) wrote :

Fixed in the trunk, revision 12340.
Thanks, Maggio!

Changed in inkscape:
status: In Progress → Fix Committed
tags: added: backport-proposed
Revision history for this message
su_v (suv-lp) wrote :

@JazzyNico - revision 12340 introduces a regression: saving a new document overwrites the default template file instead of asking for a new file name (and 'Save as' also proposes to overwrite the default template). Happens with all local builds on OS X 10.7.5, as well as on Ubuntu 12.10 (VM, 64bit). Not reproduced with r12339.

Would you prefer me to file a new report, or to reopen this one?

Revision history for this message
su_v (suv-lp) wrote :

> revision 12340 introduces a regression: saving a new document
> overwrites the default template file instead of asking for a new file name

Sample steps to reproduce:
1) launch current trunk by itself
2) modify the 'New Document' (e.g. draw a rect)
3) save (Ctrl+S)

Expected result:
The file dialog opens and prompts for file name (default: 'drawing.svg') and location.

Actual result:
The default template is resaved with the content of the current 'New Document'.

jazzynico (jazzynico)
Changed in inkscape:
status: Fix Committed → In Progress
Revision history for this message
jazzynico (jazzynico) wrote :

Patch reverted revision 12341.

~suv> Would you prefer me to file a new report, or to reopen this one?

I think it's safer to revert the fix and work on the regression with a new patch.

Revision history for this message
jazzynico (jazzynico) wrote :

Here's a new patch version that should work as expected (tested on Windows XP, Inkscape trunk revision 12397).
Please test!

Revision history for this message
jazzynico (jazzynico) wrote :

Modified patch from comment #11 tested successfully on Crunchbang Waldorf (Debian stable) and committed revision 12712.

Changed in inkscape:
status: In Progress → Fix Committed
Revision history for this message
jazzynico (jazzynico) wrote :

Too many changes in the trunk, and porting to the branch would be a bit too risky IMHO. Removing the backport-proposed tag.

tags: removed: backport-proposed
Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.