Sketcher: restore constraint filter if Multiple dialog is canceled
This commit is contained in:
@@ -583,7 +583,7 @@ void ConstraintView::centerSelectedItems()
|
||||
void ConstraintView::deleteSelectedItems()
|
||||
{
|
||||
App::Document* doc = App::GetApplication().getActiveDocument();
|
||||
if (!doc)
|
||||
if (!doc)
|
||||
return;
|
||||
|
||||
doc->openTransaction("Delete constraint");
|
||||
@@ -828,6 +828,11 @@ void TaskSketcherConstraints::on_multipleFilterButton_clicked(bool)
|
||||
// if tracking, it will call slotConstraintChanged via update mechanism as Multi Filter affects not only visibility, but also filtered list content, if not tracking will still update the list to match the multi-filter.
|
||||
updateList();
|
||||
}
|
||||
else
|
||||
{
|
||||
// restore previous filter if Multiple filter dialog is canceled
|
||||
ui->comboBoxFilter->setCurrentIndex(filterindex);
|
||||
}
|
||||
}
|
||||
|
||||
void TaskSketcherConstraints::on_settingsDialogButton_clicked(bool)
|
||||
@@ -1140,7 +1145,7 @@ void TaskSketcherConstraints::on_listWidgetConstraints_itemSelectionChanged(void
|
||||
void TaskSketcherConstraints::on_listWidgetConstraints_itemActivated(QListWidgetItem *item)
|
||||
{
|
||||
ConstraintItem *it = dynamic_cast<ConstraintItem*>(item);
|
||||
if (!it)
|
||||
if (!it)
|
||||
return;
|
||||
|
||||
// if its the right constraint
|
||||
@@ -1155,7 +1160,7 @@ void TaskSketcherConstraints::on_listWidgetConstraints_updateDrivingStatus(QList
|
||||
{
|
||||
Q_UNUSED(status);
|
||||
ConstraintItem *citem = dynamic_cast<ConstraintItem*>(item);
|
||||
if (!citem)
|
||||
if (!citem)
|
||||
return;
|
||||
|
||||
Gui::Application::Instance->commandManager().runCommandByName("Sketcher_ToggleDrivingConstraint");
|
||||
@@ -1166,7 +1171,7 @@ void TaskSketcherConstraints::on_listWidgetConstraints_updateActiveStatus(QListW
|
||||
{
|
||||
Q_UNUSED(status);
|
||||
ConstraintItem *citem = dynamic_cast<ConstraintItem*>(item);
|
||||
if (!citem)
|
||||
if (!citem)
|
||||
return;
|
||||
|
||||
Gui::Application::Instance->commandManager().runCommandByName("Sketcher_ToggleActiveConstraint");
|
||||
|
||||
Reference in New Issue
Block a user