mirror of https://github.com/CGAL/cgal
simpler patch for removing info with item (r67819).
Revert r70929
This commit is contained in:
parent
94a1c41aa3
commit
b2bb0ce45a
|
|
@ -131,7 +131,7 @@ MainWindow::MainWindow(QWidget* parent)
|
|||
viewer->setScene(scene);
|
||||
sceneView->setModel(scene);
|
||||
|
||||
// setup the treeview: delegation and columns sizing...
|
||||
// setup the sceneview: delegation and columns sizing...
|
||||
sceneView->setItemDelegate(new SceneDelegate(this));
|
||||
|
||||
sceneView->header()->setStretchLastSection(false);
|
||||
|
|
@ -151,9 +151,6 @@ MainWindow::MainWindow(QWidget* parent)
|
|||
connect(scene, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex & )),
|
||||
this, SLOT(updateInfo()));
|
||||
|
||||
connect(scene, SIGNAL(itemsDestroyed()),
|
||||
this, SLOT(updateInfo()));
|
||||
|
||||
|
||||
connect(scene, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex & )),
|
||||
this, SLOT(updateDisplayInfo()));
|
||||
|
|
@ -791,13 +788,18 @@ Scene_item* MainWindow::load_item(QFileInfo fileinfo, Polyhedron_demo_io_plugin_
|
|||
|
||||
void MainWindow::selectSceneItem(int i)
|
||||
{
|
||||
if(i < 0) return;
|
||||
if(i >= scene->numberOfEntries()) return;
|
||||
|
||||
sceneView->selectionModel()->select(scene->createSelection(i),
|
||||
QItemSelectionModel::ClearAndSelect);
|
||||
if(i < 0 || i >= scene->numberOfEntries()) {
|
||||
sceneView->selectionModel()->clearSelection();
|
||||
updateInfo();
|
||||
updateDisplayInfo();
|
||||
}
|
||||
else {
|
||||
sceneView->selectionModel()->select(scene->createSelection(i),
|
||||
QItemSelectionModel::ClearAndSelect);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::showSelectedPoint(double x, double y, double z)
|
||||
{
|
||||
information(QString("Selected point: (%1, %2, %3)").
|
||||
|
|
|
|||
|
|
@ -111,8 +111,6 @@ Scene::erase(QList<int> indices)
|
|||
emit updated();
|
||||
QAbstractListModel::reset();
|
||||
|
||||
emit itemsDestroyed();
|
||||
|
||||
int index = max_index + 1 - indices.size();
|
||||
if(index >= 0)
|
||||
return index;
|
||||
|
|
|
|||
|
|
@ -130,7 +130,6 @@ signals:
|
|||
void updated_bbox();
|
||||
void updated();
|
||||
void itemAboutToBeDestroyed(Scene_item*);
|
||||
void itemsDestroyed();
|
||||
void selectionRay(double, double, double, double, double, double);
|
||||
|
||||
private slots:
|
||||
|
|
|
|||
Loading…
Reference in New Issue