Skip to content

Commit

Permalink
add map by double click
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@4977 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed Mar 6, 2006
1 parent 5221588 commit 9ce9eb3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/plugins/grass/qgsgrassbrowser.cpp
Expand Up @@ -108,6 +108,9 @@ QgsGrassBrowser::QgsGrassBrowser ( QgisIface *iface,
connect ( mTree->selectionModel(),
SIGNAL(currentChanged(QModelIndex,QModelIndex)),
this, SLOT(currentChanged(QModelIndex,QModelIndex)) );

connect ( mTree, SIGNAL(doubleClicked(QModelIndex)),
this, SLOT(doubleClicked(QModelIndex)) );
}

QgsGrassBrowser::~QgsGrassBrowser() { }
Expand Down Expand Up @@ -156,6 +159,15 @@ void QgsGrassBrowser::addMap()
}
}

void QgsGrassBrowser::doubleClicked(const QModelIndex & index)
{
#ifdef QGISDEBUG
std::cerr << "QgsGrassBrowser::doubleClicked()" << std::endl;
#endif

addMap();
}

void QgsGrassBrowser::deleteMap()
{
#ifdef QGISDEBUG
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/grass/qgsgrassbrowser.h
Expand Up @@ -54,6 +54,9 @@ public slots:
void selectionChanged(const QItemSelection & selected, const QItemSelection & deselected);
void currentChanged(const QModelIndex & current, const QModelIndex & previous);

// Double click
void doubleClicked(const QModelIndex & index);

private:
QgisIface *mIface;

Expand Down

0 comments on commit 9ce9eb3

Please sign in to comment.