Bug 109279 - Used data objects cannot be deleted from context menu but can be deleted through Delete button
Summary: Used data objects cannot be deleted from context menu but can be deleted thro...
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Rick Chern
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-18 21:46 UTC by Rick Chern
Modified: 2005-07-18 21:51 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 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);