From 8698f255a078319cdb6930330b83d551f7457235 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 29 Feb 2012 12:21:15 +0100 Subject: [PATCH] 0000286: Feature request for better Fillet/Chamfer --- src/Mod/Part/Gui/DlgFilletEdges.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Mod/Part/Gui/DlgFilletEdges.cpp b/src/Mod/Part/Gui/DlgFilletEdges.cpp index 654fd579c..6fa8ab5e9 100644 --- a/src/Mod/Part/Gui/DlgFilletEdges.cpp +++ b/src/Mod/Part/Gui/DlgFilletEdges.cpp @@ -215,7 +215,8 @@ void DlgFilletEdges::onSelectionChanged(const Gui::SelectionChanges& msg) // no object selected in the combobox or no sub-element was selected if (!d->object || !msg.pSubName) return; - if (msg.Type == Gui::SelectionChanges::AddSelection) { + if (msg.Type == Gui::SelectionChanges::AddSelection || + msg.Type == Gui::SelectionChanges::RmvSelection) { // when adding a sub-element to the selection check // whether this is the currently handled object App::Document* doc = d->object->getDocument(); @@ -229,7 +230,9 @@ void DlgFilletEdges::onSelectionChanged(const Gui::SelectionChanges& msg) QString name = QString::fromAscii("Edge%1").arg(id); if (name == subelement) { // ok, check the selected sub-element - Qt::CheckState checkState = Qt::Checked; + Qt::CheckState checkState = + (msg.Type == Gui::SelectionChanges::AddSelection + ? Qt::Checked : Qt::Unchecked); QVariant value(static_cast(checkState)); QModelIndex index = model->index(i,0); model->setData(index, value, Qt::CheckStateRole); @@ -237,6 +240,7 @@ void DlgFilletEdges::onSelectionChanged(const Gui::SelectionChanges& msg) ui->treeView->selectionModel()->setCurrentIndex(index,QItemSelectionModel::NoUpdate); QItemSelection selection(index, model->index(i,1)); ui->treeView->selectionModel()->select(selection, QItemSelectionModel::ClearAndSelect); + ui->treeView->update(); break; } }