From 316a8840b40bf760e79314bb961b95a00799d02b Mon Sep 17 00:00:00 2001 From: donovaly Date: Sun, 16 Feb 2020 22:13:17 +0100 Subject: [PATCH] remove unnecessary code and comment --- src/Mod/PartDesign/Gui/TaskChamferParameters.cpp | 6 ------ src/Mod/PartDesign/Gui/TaskDraftParameters.cpp | 7 ------- src/Mod/PartDesign/Gui/TaskFilletParameters.cpp | 7 ------- src/Mod/PartDesign/Gui/TaskThicknessParameters.cpp | 6 ------ 4 files changed, 26 deletions(-) diff --git a/src/Mod/PartDesign/Gui/TaskChamferParameters.cpp b/src/Mod/PartDesign/Gui/TaskChamferParameters.cpp index 1088b05a65..cedb467b50 100644 --- a/src/Mod/PartDesign/Gui/TaskChamferParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskChamferParameters.cpp @@ -159,12 +159,6 @@ void TaskChamferParameters::clearButtons(const selectionModes notThis) void TaskChamferParameters::onRefDeleted(void) { - // get vector of selected objects of active document to assure we have a valid selection - std::vector selection = Gui::Selection().getSelectionEx(); - if (selection.size() == 0) { - QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); - return; - } // assure we we are not in selection mode exitSelectionMode(); clearButtons(none); diff --git a/src/Mod/PartDesign/Gui/TaskDraftParameters.cpp b/src/Mod/PartDesign/Gui/TaskDraftParameters.cpp index 5c79d99801..041d4e76ab 100644 --- a/src/Mod/PartDesign/Gui/TaskDraftParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskDraftParameters.cpp @@ -233,12 +233,6 @@ void TaskDraftParameters::onButtonLine(bool checked) void TaskDraftParameters::onRefDeleted(void) { - // get vector of selected objects of active document to assure we have a valid selection - std::vector selection = Gui::Selection().getSelectionEx(); - if (selection.size() == 0) { - QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); - return; - } // assure we we are not in selection mode exitSelectionMode(); clearButtons(none); @@ -251,7 +245,6 @@ void TaskDraftParameters::onRefDeleted(void) // delete the selection backwards to assure the list index keeps valid for the deletion for (int i = selectedList.count() - 1; i > -1; i--) { - //QMessageBox::warning(this, tr("i"), QString::number(i)); QListWidgetItem* item = selectedList.at(i); // get the fillet object PartDesign::Draft* pcDraft = static_cast(DressUpView->getObject()); diff --git a/src/Mod/PartDesign/Gui/TaskFilletParameters.cpp b/src/Mod/PartDesign/Gui/TaskFilletParameters.cpp index ed4664f38f..4bccf952d2 100644 --- a/src/Mod/PartDesign/Gui/TaskFilletParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskFilletParameters.cpp @@ -159,12 +159,6 @@ void TaskFilletParameters::clearButtons(const selectionModes notThis) void TaskFilletParameters::onRefDeleted(void) { - // get vector of selected objects of active document to assure we have a valid selection - std::vector selection = Gui::Selection().getSelectionEx(); - if (selection.size() == 0) { - QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); - return; - } // assure we we are not in selection mode exitSelectionMode(); clearButtons(none); @@ -177,7 +171,6 @@ void TaskFilletParameters::onRefDeleted(void) // delete the selection backwards to assure the list index keeps valid for the deletion for (int i = selectedList.count()-1; i > -1; i--) { - //QMessageBox::warning(this, tr("i"), QString::number(i)); QListWidgetItem* item = selectedList.at(i); // get the fillet object PartDesign::Fillet* pcFillet = static_cast(DressUpView->getObject()); diff --git a/src/Mod/PartDesign/Gui/TaskThicknessParameters.cpp b/src/Mod/PartDesign/Gui/TaskThicknessParameters.cpp index c48d5f9e50..8037ee0bfb 100644 --- a/src/Mod/PartDesign/Gui/TaskThicknessParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskThicknessParameters.cpp @@ -181,12 +181,6 @@ void TaskThicknessParameters::clearButtons(const selectionModes notThis) void TaskThicknessParameters::onRefDeleted(void) { - // get vector of selected objects of active document to assure we have a valid selection - std::vector selection = Gui::Selection().getSelectionEx(); - if (selection.size() == 0) { - QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); - return; - } // assure we we are not in selection mode exitSelectionMode(); clearButtons(none);