[Uml-devel] KDE/kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Wed Mar 1 10:59:01 UTC 2006


SVN commit 514871 by okellogg:

apply commit 514870 from branches/KDE/3.5

 M  +7 -0      umlview.h  
 M  +6 -0      umlwidget.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/umlview.h #514870:514871
@@ -920,6 +920,13 @@
     }
 
     /**
+     * Return pointer to the first selected widget (for multi-selection)
+     */
+    UMLWidget* getFirstMultiSelectedWidget() {
+        return m_SelectedList.first();
+    }
+
+    /**
      * Return the current UMLWidget we are on.
      */
     UMLWidget * getOnWidget() {
--- trunk/KDE/kdesdk/umbrello/umbrello/umlwidget.cpp #514870:514871
@@ -484,6 +484,8 @@
     QFont font;
     QColor newColour;
     const Uml::Widget_Type wt = m_Type;
+    UMLWidget* widget = 0; // use for select the first object properties (fill, line color)
+
     switch(sel) {
     case ListPopupMenu::mt_Rename:
         m_pDoc -> renameUMLObject(m_pObject);
@@ -512,6 +514,8 @@
 
     case ListPopupMenu::mt_Line_Color:
     case ListPopupMenu::mt_Line_Color_Selection:
+        widget = m_pView->getFirstMultiSelectedWidget();
+        if (widget) { newColour = widget->getLineColor(); }
         if( KColorDialog::getColor(newColour) ) {
             m_pView -> selectionSetLineColor( newColour );
             m_pDoc -> setModified(true);
@@ -520,6 +524,8 @@
 
     case ListPopupMenu::mt_Fill_Color:
     case ListPopupMenu::mt_Fill_Color_Selection:
+        widget = m_pView->getFirstMultiSelectedWidget();
+        if (widget) { newColour = widget->getFillColour(); }
         if ( KColorDialog::getColor(newColour) ) {
             m_pView -> selectionSetFillColor( newColour );
             m_pDoc -> setModified(true);




More information about the umbrello-devel mailing list