diff options
author | Arno <am@disconnect.de> | 2010-06-18 15:52:01 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2010-06-18 15:52:01 +0200 |
commit | b153f90a4c7f76a5ce5f4985bdbd687ba1602fdb (patch) | |
tree | 7e2bfc14e62e24b56a77b3afd2e40003956fb49d /shemov.cpp | |
parent | a8bd9a2310bd630dd4e72fe0ff54a8be17e80064 (diff) | |
download | SheMov-b153f90a4c7f76a5ce5f4985bdbd687ba1602fdb.tar.gz SheMov-b153f90a4c7f76a5ce5f4985bdbd687ba1602fdb.tar.bz2 SheMov-b153f90a4c7f76a5ce5f4985bdbd687ba1602fdb.zip |
Created frontend for SeriesTreeModel::deleteFromSeries
Implemented frontend for SeriesTreeModel::deleteFromSeries. I hope
QPersistentModelIndexes work as advertised. From the qt-sources it seems
that a QPersistentModelIndex is automatically updated by
QAbstractItemModel when calling begin(Remove|Insert)Rows. Testing worked
out fine.
While at it I found a bug in SmTreeModel. removeRows has to be called
with (i - 1) instead of (i) to remove the correct nodes.
Diffstat (limited to 'shemov.cpp')
-rw-r--r-- | shemov.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -357,11 +357,12 @@ void SheMov::createActions(){ connect(mStatisticsA, SIGNAL(triggered()), this, SLOT(showStatistics())); //Tree context menu - mNewSeriesA = new QAction(tr("New series"), this); + mNewSeriesA = new QAction(tr("New series..."), this); mATree->seriesWidget()->seriesTree()->addAction(mNewSeriesA); connect(mNewSeriesA, SIGNAL(triggered()), mATree->seriesWidget(), SLOT(newSeries())); - mDeleteFromSeriesA = new QAction(tr("Delete entry..."), this); + mDeleteFromSeriesA = new QAction(tr("Delete entries..."), this); mATree->seriesWidget()->seriesTree()->addAction(mDeleteFromSeriesA); + connect(mDeleteFromSeriesA, SIGNAL(triggered()), mATree->seriesWidget(), SLOT(deleteFromSeries())); // misc |