mirror of https://github.com/CGAL/cgal
update info when items are deleted
This commit is contained in:
parent
eecde00a77
commit
ea408a8602
|
|
@ -151,6 +151,9 @@ MainWindow::MainWindow(QWidget* parent)
|
||||||
connect(scene, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex & )),
|
connect(scene, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex & )),
|
||||||
this, SLOT(updateInfo()));
|
this, SLOT(updateInfo()));
|
||||||
|
|
||||||
|
connect(scene, SIGNAL(itemsDestroyed()),
|
||||||
|
this, SLOT(updateInfo()));
|
||||||
|
|
||||||
|
|
||||||
connect(scene, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex & )),
|
connect(scene, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex & )),
|
||||||
this, SLOT(updateDisplayInfo()));
|
this, SLOT(updateDisplayInfo()));
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,8 @@ Scene::erase(QList<int> indices)
|
||||||
emit updated();
|
emit updated();
|
||||||
QAbstractListModel::reset();
|
QAbstractListModel::reset();
|
||||||
|
|
||||||
|
emit itemsDestroyed();
|
||||||
|
|
||||||
int index = max_index + 1 - indices.size();
|
int index = max_index + 1 - indices.size();
|
||||||
if(index >= 0)
|
if(index >= 0)
|
||||||
return index;
|
return index;
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,7 @@ signals:
|
||||||
void updated_bbox();
|
void updated_bbox();
|
||||||
void updated();
|
void updated();
|
||||||
void itemAboutToBeDestroyed(Scene_item*);
|
void itemAboutToBeDestroyed(Scene_item*);
|
||||||
|
void itemsDestroyed();
|
||||||
void selectionRay(double, double, double, double, double, double);
|
void selectionRay(double, double, double, double, double, double);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue