mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
563263ab4f
commit
9771c57a54
2 changed files with 0 additions and 8 deletions
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue