Bug 109279

Summary: Used data objects cannot be deleted from context menu but can be deleted through Delete button
Product: [Applications] kst Reporter: Rick Chern <rchern>
Component: generalAssignee: Rick Chern <rchern>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.x   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Rick Chern 2005-07-18 21:46:11 UTC
Version:            (using KDE KDE 3.3.0)
Installed from:    00

How to reproduce:
- create a vector
- create a curve from the vector
- right click on the vector

The vector has "Delete" disabled. 

- highlight the vector and click "Delete" at the bottom of the data manager

The vector and curve are deleted properly

Expected Behaviour:

The "Delete" menu item should be enabled whenever the "Delete" button is enabled.
Comment 1 Rick Chern 2005-07-18 21:51:31 UTC
SVN commit 435978 by rchern:

Always enable the delete menu item when it is present

CCMAIL: 109279-done@bugs.kde.org

 M  +1 -2      kstdatamanager_i.cpp  


--- trunk/extragear/graphics/kst/kst/kstdatamanager_i.cpp #435977:435978
@@ -842,7 +842,7 @@
   m->insertTitle(koi->text(0));
 
   int id;
-  if (koi->rtti() != RTTI_OBJ_VECTOR) {
+  if (koi->rtti() != RTTI_OBJ_VECTOR && koi->rtti() != RTTI_OBJ_MATRIX) {
     id = m->insertItem(i18n("&Edit..."), this, SLOT(edit_I()));
   }
 
@@ -966,7 +966,6 @@
   if (koi->rtti() != RTTI_OBJ_VECTOR && koi->rtti() != RTTI_OBJ_MATRIX) {
     // no slave vectors or matrices get this
     id = m->insertItem(i18n("&Delete"), this, SLOT(delete_I()));
-    m->setItemEnabled(id, koi->removable());
   }
 
   m->popup(p);