From 5d1212232588ff98da324f11312f8229c21bd839 Mon Sep 17 00:00:00 2001 From: dismine Date: Fri, 29 Aug 2014 17:48:48 +0300 Subject: [PATCH] Show tool name in options title. --HG-- branch : feature --- src/app/widgets/vtooloptionspropertybrowser.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/app/widgets/vtooloptionspropertybrowser.cpp b/src/app/widgets/vtooloptionspropertybrowser.cpp index 42e803b42..b8d73b06b 100644 --- a/src/app/widgets/vtooloptionspropertybrowser.cpp +++ b/src/app/widgets/vtooloptionspropertybrowser.cpp @@ -78,8 +78,7 @@ void VToolOptionsPropertyBrowser::itemClicked(QGraphicsItem *item) if (currentItem == nullptr) { - QDockWidget *parent = qobject_cast(this->parent()); - parent->setWindowTitle(tr("Tool options")); + TreeView->setTitle(tr("")); return; } @@ -122,10 +121,6 @@ void VToolOptionsPropertyBrowser::userChangedData(VProperty *property) { currentItem->setPos(variant.toPointF()); } -// else if (id == QLatin1String("list")) -// { -// qDebug()<data(VProperty::DPC_Data, Qt::DisplayRole); -// } break; } case VToolEndLine::Type: @@ -265,8 +260,7 @@ void VToolOptionsPropertyBrowser::ShowItemOptions(QGraphicsItem *item) case VToolSinglePoint::Type: { VToolSinglePoint *i = qgraphicsitem_cast(item); - QDockWidget *parent = qobject_cast(this->parent()); - parent->setWindowTitle(tr("Tool options (Base point)")); + TreeView->setTitle(tr("Base point")); VProperty* itemName = new VProperty(tr("Point name")); itemName->setValue(i->name()); @@ -281,8 +275,7 @@ void VToolOptionsPropertyBrowser::ShowItemOptions(QGraphicsItem *item) case VToolEndLine::Type: { VToolEndLine *i = qgraphicsitem_cast(item); - QDockWidget *parent = qobject_cast(this->parent()); - parent->setWindowTitle(tr("Tool options (Point at distance and angle)")); + TreeView->setTitle(tr("Point at distance and angle")); VProperty* itemName = new VProperty(tr("Point name")); itemName->setValue(i->name());