Bug 143581 - Allowing to duplicate diagrams.
Summary: Allowing to duplicate diagrams.
Status: RESOLVED WORKSFORME
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-29 05:40 UTC by Alonso Inostrosa Psijas
Modified: 2007-03-30 06:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alonso Inostrosa Psijas 2007-03-29 05:40:02 UTC
Version:           1.5.5 (using KDE KDE 3.5.5)
Installed from:    Ubuntu Packages

Some diagrams are very similar. By now you just have to do the new diagram almost from scratch.
Instead, it would be very useful to duplicate a diagram in order to modify it later, to get the desired new diagram.
Comment 1 Oliver Kellogg 2007-03-29 23:06:21 UTC
SVN commit 647909 by okellogg:

mousePressEmpty(): Do not call ToolBarState::mousePressEmpty() on RMB press.

How to use this fix:
1) Make a multiple selection on an existing diagram either by left mouse button
   click on diagram items with the Shift pressed, or by pressing Control-A on
   the keyboard to select all diagram items.
2) Click right mouse button on empty diagram space and at the popup menu select
   "Copy".
3) Go to the target diagram and press the right mouse button in the diagram
   area. At the popup menu, select "Paste".

BUG:143581


 M  +1 -0      ChangeLog  
 M  +6 -1      umbrello/toolbarstatearrow.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #647908:647909
@@ -31,6 +31,7 @@
   not checked (142093)
 * Missing "with" on Ada code generation for aggregation (142392)
 * Operation Properties "Type" combo box too small (143319)
+* Support duplication of diagrams (143581)
 
 Version 1.5.61
 
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/toolbarstatearrow.cpp #647908:647909
@@ -42,10 +42,15 @@
 }
 
 void ToolBarStateArrow::mousePressEmpty() {
+    if (m_pMouseEvent->button() != Qt::LeftButton) {
+        // Leave widgets selected upon RMB press on empty diagram area.
+        // The popup menu is activated upon RMB release.
+        return;
+    }
     ToolBarState::mousePressEmpty();
 
     // Starts the selection rectangle
-    if (m_pMouseEvent->button() == Qt::LeftButton && m_selectionRect.count() == 0) {
+    if (m_selectionRect.count() == 0) {
         m_startPosition = m_pMouseEvent->pos();
 
         for (int i = 0; i < 4; i++) {
Comment 2 Alonso Inostrosa Psijas 2007-03-29 23:36:10 UTC
Before posting this in the wishlist i did the steps detailed as part of the solution and i got an error message but all got pasted on the new empty diagram space were the comments drawings.
Comment 3 Oliver Kellogg 2007-03-30 06:29:55 UTC
Why do you reopen?
The fix is only available in the newest SVN version on branches/KDE/3.5.
If you want to try out the fix then you need to build from SVN, see
http://uml.sourceforge.net/install.php#source-code
Comment 4 Alonso Inostrosa Psijas 2007-03-30 06:37:18 UTC
Sorry, i'm new at this. I thought that the answer was the procedure i should do to get the duplication of the diagram. Didn't get that it will be possible on the future.
Thanks.
Comment 5 Oliver Kellogg 2007-03-30 06:54:45 UTC
see commit 647909