diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-12 11:58:35 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-04-12 10:32:58 -0700 |
commit | 9771c57a54d4f56aadb623b9203d4b7320067273 (patch) | |
tree | c714d9ca81f7279e5731c9cb793c277aa0e0a665 | |
parent | 563263ab4fd862e9ad834e85b9815f69977da304 (diff) | |
download | subsurface-9771c57a54d4f56aadb623b9203d4b7320067273.tar.gz |
delegates: remove TankInfoDelegate::createEditor()
When creating a TankInfoDelegate editor, reploting of the profile
was disabled to avoid replotting when the user scrolls through
the tank-info list. Since the code was changed to only set the
tank-info when the editor is closed, this became unnecessary
(hopefully). Indeed the clearing of the flag was removed in a
previous commit. This means that we also have to remove the setting
of the flag. Since this is all the TankInfoDelegate::createEditor()
function was doing, we can remove the whole function.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r-- | desktop-widgets/modeldelegates.cpp | 7 | ||||
-rw-r--r-- | desktop-widgets/modeldelegates.h | 1 |
2 files changed, 0 insertions, 8 deletions
diff --git a/desktop-widgets/modeldelegates.cpp b/desktop-widgets/modeldelegates.cpp index 5480a41db..781ee740d 100644 --- a/desktop-widgets/modeldelegates.cpp +++ b/desktop-widgets/modeldelegates.cpp @@ -247,13 +247,6 @@ void TankInfoDelegate::editorClosed(QWidget*, QAbstractItemDelegate::EndEditHint mymodel->setData(IDX(CylindersModel::TYPE), currCombo.activeText, CylindersModel::COMMIT_ROLE); } -QWidget *TankInfoDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const -{ - QWidget *delegate = ComboBoxDelegate::createEditor(parent, option, index); - MainWindow::instance()->graphics->setReplot(false); - return delegate; -} - TankUseDelegate::TankUseDelegate(QObject *parent) : QStyledItemDelegate(parent) { } diff --git a/desktop-widgets/modeldelegates.h b/desktop-widgets/modeldelegates.h index 95e9c5fef..db804c8be 100644 --- a/desktop-widgets/modeldelegates.h +++ b/desktop-widgets/modeldelegates.h @@ -63,7 +63,6 @@ class TankInfoDelegate : public ComboBoxDelegate { public: explicit TankInfoDelegate(QObject *parent = 0); void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override; - QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override; public slots: void editorClosed(QWidget *widget, QAbstractItemDelegate::EndEditHint hint); |