Restore name of the scene_selection_item and tooltip says Selection instead of Polyhedron

This commit is contained in:
Maxime Gimeno 2017-07-21 15:44:39 +02:00
parent 15d9bc94d5
commit 6e8b3a5aaf
2 changed files with 4 additions and 1 deletions

View File

@ -177,6 +177,7 @@ public Q_SLOTS:
Scene_face_graph_item* poly_item = getSelectedItem<Scene_face_graph_item>();
if(!poly_item || selection_item_map.find(poly_item) != selection_item_map.end()) { return; }
Scene_polyhedron_selection_item* new_item = new Scene_polyhedron_selection_item(poly_item, mw);
new_item->setName(QString("%1 (selection)").arg(poly_item->name()));
connectItem(new_item);
}
@ -185,6 +186,7 @@ public Q_SLOTS:
if(!poly_item)
return NULL;
Scene_polyhedron_selection_item* new_item = new Scene_polyhedron_selection_item(poly_item, mw);
new_item->setName(QString("%1 (selection)").arg(poly_item->name()));
connectItem(new_item);
return new_item;
@ -294,6 +296,7 @@ public Q_SLOTS:
// all other arrangements (putting inside selection_item_map), setting names etc,
// other params (e.g. k_ring) will be set inside new_item_created
Scene_polyhedron_selection_item* new_item = new Scene_polyhedron_selection_item(poly_item, mw);
new_item->setName(QString("%1 (selection)").arg(poly_item->name()));
ui_widget.selectionOrEuler->setCurrentIndex(last_mode);
connectItem(new_item);
}

View File

@ -22,7 +22,7 @@ Scene_polyhedron_item_decorator::toolTip() const
if(!poly_item->polyhedron())
return QString();
return QObject::tr("<p>Polyhedron <b>%1</b> (mode: %5, color: %6)</p>"
return QObject::tr("<p>Selection <b>%1</b> (mode: %5, color: %6)</p>"
"<p>Number of vertices: %2<br />"
"Number of edges: %3<br />"
"Number of faces: %4</p>")