mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
undo: remove EditNumber command
Number editing works via the RenumberDives command. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
6e59ee00d8
commit
9722f04e40
4 changed files with 0 additions and 37 deletions
|
@ -168,11 +168,6 @@ int editMode(int index, int newValue, bool currentDiveOnly)
|
||||||
return execute_edit(new EditMode(index, newValue, currentDiveOnly));
|
return execute_edit(new EditMode(index, newValue, currentDiveOnly));
|
||||||
}
|
}
|
||||||
|
|
||||||
int editNumber(int newValue, bool currentDiveOnly)
|
|
||||||
{
|
|
||||||
return execute_edit(new EditNumber(newValue, currentDiveOnly));
|
|
||||||
}
|
|
||||||
|
|
||||||
int editSuit(const QString &newValue, bool currentDiveOnly)
|
int editSuit(const QString &newValue, bool currentDiveOnly)
|
||||||
{
|
{
|
||||||
return execute_edit(new EditSuit(newValue, currentDiveOnly));
|
return execute_edit(new EditSuit(newValue, currentDiveOnly));
|
||||||
|
|
|
@ -66,7 +66,6 @@ void purgeUnusedDiveSites();
|
||||||
int editNotes(const QString &newValue, bool currentDiveOnly);
|
int editNotes(const QString &newValue, bool currentDiveOnly);
|
||||||
int editSuit(const QString &newValue, bool currentDiveOnly);
|
int editSuit(const QString &newValue, bool currentDiveOnly);
|
||||||
int editMode(int index, int newValue, bool currentDiveOnly);
|
int editMode(int index, int newValue, bool currentDiveOnly);
|
||||||
int editNumber(int newValue, bool currentDiveOnly);
|
|
||||||
int editRating(int newValue, bool currentDiveOnly);
|
int editRating(int newValue, bool currentDiveOnly);
|
||||||
int editVisibility(int newValue, bool currentDiveOnly);
|
int editVisibility(int newValue, bool currentDiveOnly);
|
||||||
int editWaveSize(int newValue, bool currentDiveOnly);
|
int editWaveSize(int newValue, bool currentDiveOnly);
|
||||||
|
|
|
@ -574,28 +574,6 @@ DiveField EditMode::fieldId() const
|
||||||
return DiveField::MODE;
|
return DiveField::MODE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***** Number *****
|
|
||||||
void EditNumber::set(struct dive *d, int number) const
|
|
||||||
{
|
|
||||||
d->number = number;
|
|
||||||
}
|
|
||||||
|
|
||||||
int EditNumber::data(struct dive *d) const
|
|
||||||
{
|
|
||||||
return d->number;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString EditNumber::fieldName() const
|
|
||||||
{
|
|
||||||
return tr("number");
|
|
||||||
}
|
|
||||||
|
|
||||||
DiveField EditNumber::fieldId() const
|
|
||||||
{
|
|
||||||
return DiveField::NR;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ***** Tag based commands *****
|
// ***** Tag based commands *****
|
||||||
EditTagsBase::EditTagsBase(const QStringList &newListIn, bool currentDiveOnly) :
|
EditTagsBase::EditTagsBase(const QStringList &newListIn, bool currentDiveOnly) :
|
||||||
EditDivesBase(currentDiveOnly),
|
EditDivesBase(currentDiveOnly),
|
||||||
|
|
|
@ -222,15 +222,6 @@ public:
|
||||||
DiveField fieldId() const override;
|
DiveField fieldId() const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class EditNumber : public EditBase<int> {
|
|
||||||
public:
|
|
||||||
using EditBase<int>::EditBase; // Use constructor of base class.
|
|
||||||
void set(struct dive *d, int number) const override;
|
|
||||||
int data(struct dive *d) const override;
|
|
||||||
QString fieldName() const override;
|
|
||||||
DiveField fieldId() const override;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Fields that work with tag-lists (tags, buddies, divemasters) work differently and therefore
|
// Fields that work with tag-lists (tags, buddies, divemasters) work differently and therefore
|
||||||
// have their own base class. In this case, it's not a template, as all these lists are base
|
// have their own base class. In this case, it's not a template, as all these lists are base
|
||||||
// on strings.
|
// on strings.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue