mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Connect & disconnect the PictureModel on the profile
Ignore the warnings for now, this patch connects and disconnects the (not done yet) plotPictures() method. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
eb24d90c8e
commit
ebe799e0a0
1 changed files with 9 additions and 0 deletions
|
@ -701,6 +701,11 @@ void ProfileWidget2::setProfileState()
|
|||
return;
|
||||
|
||||
disconnectTemporaryConnections();
|
||||
connect(DivePictureModel::instance(), SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(plotPictures()));
|
||||
connect(DivePictureModel::instance(), SIGNAL(rowsInserted(const QModelIndex &, int, int)),this, SLOT(plotPictureS()));
|
||||
connect(DivePictureModel::instance(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),this, SLOT(plotPictures()));
|
||||
/* show the same stuff that the profile shows. */
|
||||
|
||||
//TODO: Move the DC handling to another method.
|
||||
MainWindow::instance()->enableDcShortcuts();
|
||||
|
||||
|
@ -1044,6 +1049,10 @@ void ProfileWidget2::disconnectTemporaryConnections()
|
|||
disconnect(plannerModel, SIGNAL(rowsRemoved(const QModelIndex &, int, int)),
|
||||
this, SLOT(pointsRemoved(const QModelIndex &, int, int)));
|
||||
|
||||
disconnect(DivePictureModel::instance(), SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(plotPictures()));
|
||||
disconnect(DivePictureModel::instance(), SIGNAL(rowsInserted(const QModelIndex &, int, int)),this, SLOT(plotPictureS()));
|
||||
disconnect(DivePictureModel::instance(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),this, SLOT(plotPictures()));
|
||||
|
||||
Q_FOREACH (QAction *action, actionsForKeys.values()) {
|
||||
action->setShortcut(QKeySequence());
|
||||
action->setShortcutContext(Qt::WidgetShortcut);
|
||||
|
|
Loading…
Add table
Reference in a new issue