Mercurial > hg > svgui
comparison widgets/ModelDataTableDialog.cpp @ 428:55cdd79606ba
* Support transforms that output regions with more than one bin (by
creating more than one region)
* When model displayed in the spreadsheet dialog is deleted, close
the dialog in preference to crashing
author | Chris Cannam |
---|---|
date | Thu, 09 Oct 2008 13:13:33 +0000 |
parents | feeb48f7478a |
children | 2e8194a30f40 |
comparison
equal
deleted
inserted
replaced
427:1304dbe4542e | 428:55cdd79606ba |
---|---|
123 SLOT(currentChanged(const QModelIndex &, const QModelIndex &))); | 123 SLOT(currentChanged(const QModelIndex &, const QModelIndex &))); |
124 connect(m_table, SIGNAL(addCommand(Command *)), | 124 connect(m_table, SIGNAL(addCommand(Command *)), |
125 this, SLOT(addCommand(Command *))); | 125 this, SLOT(addCommand(Command *))); |
126 connect(m_table, SIGNAL(currentChanged(const QModelIndex &)), | 126 connect(m_table, SIGNAL(currentChanged(const QModelIndex &)), |
127 this, SLOT(currentChangedThroughResort(const QModelIndex &))); | 127 this, SLOT(currentChangedThroughResort(const QModelIndex &))); |
128 connect(m_table, SIGNAL(modelRemoved()), | |
129 this, SLOT(modelRemoved())); | |
128 | 130 |
129 QDialogButtonBox *bb = new QDialogButtonBox(QDialogButtonBox::Close); | 131 QDialogButtonBox *bb = new QDialogButtonBox(QDialogButtonBox::Close); |
130 connect(bb, SIGNAL(rejected()), this, SLOT(close())); | 132 connect(bb, SIGNAL(rejected()), this, SLOT(close())); |
131 grid->addWidget(bb, 2, 0); | 133 grid->addWidget(bb, 2, 0); |
132 grid->setRowStretch(2, 0); | 134 grid->setRowStretch(2, 0); |
266 // std::cerr << "ModelDataTableDialog::currentChangedThroughResort: row = " << index.row() << std::endl; | 268 // std::cerr << "ModelDataTableDialog::currentChangedThroughResort: row = " << index.row() << std::endl; |
267 // m_tableView->scrollTo(index); | 269 // m_tableView->scrollTo(index); |
268 makeCurrent(index.row()); | 270 makeCurrent(index.row()); |
269 } | 271 } |
270 | 272 |
271 | 273 void |
272 | 274 ModelDataTableDialog::modelRemoved() |
275 { | |
276 close(); | |
277 } | |
278 | |
279 |