git-svn-id: svn://db.shs.com.ru/libs@652 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -43,6 +43,13 @@ enum ObjectType {
|
||||
};
|
||||
|
||||
|
||||
QAction * newSeparator() {
|
||||
QAction * s = new QAction();
|
||||
s->setSeparator(true);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
SceneTree::SceneTree(QWidget * parent): QWidget(parent) {
|
||||
ui = new Ui::SceneTree();
|
||||
ui->setupUi(this);
|
||||
@@ -71,11 +78,13 @@ SceneTree::~SceneTree() {
|
||||
|
||||
void SceneTree::assignQGLView(QGLView * v) {
|
||||
view = v;
|
||||
objectsTreeChanged();
|
||||
if (!view) return;
|
||||
connect(view, SIGNAL(selectionChanged()), this, SLOT(selectionChanged()));
|
||||
connect(view, SIGNAL(materialsChanged()), this, SLOT(materialsChanged()));
|
||||
connect(view->scene(), SIGNAL(treeChanged()), this, SLOT(objectsTreeChanged()));
|
||||
connect(view->scene(), SIGNAL(__objectDeleted(ObjectBase*)), this, SLOT(__objectDeleted(ObjectBase*)));
|
||||
objectsTreeChanged();
|
||||
view->setContextActions(actionsSelection());
|
||||
}
|
||||
|
||||
|
||||
@@ -88,8 +97,10 @@ QList<QAction *> SceneTree::actionsAdd() {
|
||||
|
||||
QList<QAction *> SceneTree::actionsSelection() {
|
||||
QList<QAction *> ret;
|
||||
ret << ui->actionFocus << ui->actionRemove << ui->actionClone << ui->actionGroup
|
||||
<< ui->actionSelect_parent << ui->actionSelect_by_mesh << ui->actionSelect_by_material;
|
||||
ret << ui->actionFocus << newSeparator()
|
||||
<< ui->actionGroup << ui->actionClone << newSeparator()
|
||||
<< ui->actionSelect_parent << ui->actionSelect_by_mesh << ui->actionSelect_by_material << newSeparator()
|
||||
<< ui->actionRemove;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user