Mercurial > hg > svgui
diff widgets/LayerTree.cpp @ 271:1a49bd0d8375
* Change a number of keyboard shortcuts -- get rid of all the Alt+ shortcuts
and introduce a few more Ctrl+ ones instead, as well as a number of plain
single keypresses
* Add Playback menu
* Add time-ruler support for snap to feature, use it in ffwd/rewind
(rewind still needs fixing)
* restore layer hierarchy window prior to making it work correctly
author | Chris Cannam |
---|---|
date | Thu, 28 Jun 2007 14:50:58 +0000 |
parents | 33929e0c3c6b |
children | 8acd30ed735c |
line wrap: on
line diff
--- a/widgets/LayerTree.cpp Tue Jun 26 14:57:29 2007 +0000 +++ b/widgets/LayerTree.cpp Thu Jun 28 14:50:58 2007 +0000 @@ -27,9 +27,11 @@ class ViewObjectAssoc : public QObject { public: - ViewObjectAssoc(QObject *parent, View *v, QObject *o) : - QObject(parent), view(v), object(o) { + ViewObjectAssoc(View *v, QObject *o) : + QObject(0), view(v), object(o) { ++extantCount; + std::cerr << "ViewObjectAssoc (now " << extantCount << " extant)" + << std::endl; } virtual ~ViewObjectAssoc() { @@ -50,6 +52,8 @@ QAbstractItemModel(parent), m_stack(stack) { + connect(stack, SIGNAL(paneAdded()), this, SIGNAL(layoutChanged())); + connect(stack, SIGNAL(paneDeleted()), this, SIGNAL(layoutChanged())); } LayerTreeModel::~LayerTreeModel() @@ -156,12 +160,14 @@ if (column == 0) { std::cerr << "parent is pane, returning layer" << std::endl; ViewObjectAssoc *assoc = new ViewObjectAssoc - (const_cast<LayerTreeModel *>(this), pane, layer); +// (const_cast<LayerTreeModel *>(this), pane, layer); + (pane, layer); return createIndex(row, column, assoc); } else { std::cerr << "parent is pane, column != 0, returning model" << std::endl; ViewObjectAssoc *assoc = new ViewObjectAssoc - (const_cast<LayerTreeModel *>(this), pane, layer->getModel()); +// (const_cast<LayerTreeModel *>(this), pane, layer->getModel()); + (pane, layer->getModel()); return createIndex(row, column, assoc); } }