+/**
+ * According to the widget state, performs the remove action
+ */
+void CurveCreator_Widget::removeSelected()
+{
+ onRemove();
+}
+
+/**
+ * Checks whether there are some selection to be removed
+ */
+bool CurveCreator_Widget::removeEnabled()
+{
+ bool isEnabled = getActionMode() == ModificationMode;
+ if ( !isEnabled ) {
+ QList<int> aSelSections = mySectionView->getSelectedSections();
+ CurveCreator_TreeView::SelectionType aSelType = mySectionView->getSelectionType();
+ isEnabled = aSelType == CurveCreator_TreeView::ST_SECTIONS &&
+ aSelSections.size() == 1;
+ }
+ return isEnabled;
+}
+
+