Skip to content
Snippets Groups Projects
Commit faf4fabe authored by stefan's avatar stefan
Browse files

Fixes: BZDNG-98 (double click on entity/mapiso and so in in scene menu should not start editing)

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1998 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 1d5f298e
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,7 @@ SceneWin::SceneWin(QWidget* parent) :
view_->setModel(model_);
view_->setSelectionBehavior(QAbstractItemView::SelectRows);
view_->setSelectionMode(QAbstractItemView::ExtendedSelection);
view_->setEditTriggers(QAbstractItemView::EditKeyPressed);
view_->expandAll();
layout->addWidget(view_);
......@@ -67,6 +68,8 @@ SceneWin::SceneWin(QWidget* parent) :
const QItemSelection&)));
connect(view_, SIGNAL(customContextMenuRequested(const QPoint&)), this,
SLOT(ContextMenuRequested(const QPoint&)));
connect(view_, SIGNAL(doubleClicked(const QModelIndex &)), this,
SLOT(DoubleClicked(const QModelIndex &)));
connect(model_, SIGNAL(rowsInserted(const QModelIndex&, int, int)), this, SLOT(RowsInserted(const QModelIndex&, int, int)));
}
......@@ -108,6 +111,9 @@ void SceneWin::RowsInserted(const QModelIndex & parent, int start, int end){
}
}
void SceneWin::DoubleClicked(const QModelIndex & index){
SceneSelection::Instance()->CenterOnObjects();
}
void SceneWin::AddView(gfx::EntityP entity, mol::EntityView view){
......
......@@ -66,6 +66,7 @@ public slots:
private slots:
void RowsInserted(const QModelIndex & parent, int start, int end);
void DoubleClicked(const QModelIndex & index);
private:
SceneWinModel* model_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment