[Uml-devel] kdesdk/umbrello/umbrello

Sebastian Stein seb.kde at hpfsc.de
Thu Nov 6 06:06:03 UTC 2003


CVS commit by sstein: 

Right click on one element without holding any shift or ctrl key
should deselect all items and select the current one. Furthermore, it should show context menu for the selected item. This is common behaviour.


  M +9 -3      umlwidget.cpp   1.62


--- kdesdk/umbrello/umbrello/umlwidget.cpp  #1.61:1.62
@@ -321,7 +321,13 @@ void UMLWidget::mousePressEvent(QMouseEv
                 m_pView -> setSelected( this, me );
         } else if( me -> button() == RightButton ) {
-                if( !m_bSelected)
+
+                /* Right click on one element without holding any shift or ctrl key
+                 * deselects all items and selects the current one. It will show the
+                 * context menu for the selected item. This is common behaviour. */
+                bool _select = m_bSelected?false:true;
+                m_pView -> clearSelected();
+                m_bSelected = _select;
+                setSelected( m_bSelected );
                         m_pView -> setSelected( this, me );
-                setSelected( true );
                 return;
         } else {






More information about the umbrello-devel mailing list