mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: remove explicit constructor of DiveListBase
DiveListBase had an explicit constructor that initialized the "firstExecution" member variable. The latter was a development- artifact that was never used. Remove the member and the constructor. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
82c47bdd79
commit
ea40370389
2 changed files with 0 additions and 14 deletions
|
@ -331,11 +331,6 @@ static void moveDivesBetweenTrips(DivesToTrip &dives)
|
||||||
std::reverse(dives.divesToMove.begin(), dives.divesToMove.end());
|
std::reverse(dives.divesToMove.begin(), dives.divesToMove.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
// When we initialize the command we don't have to roll-back any selection change
|
|
||||||
DiveListBase::DiveListBase() : firstExecution(true)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// Turn current selection into a vector.
|
// Turn current selection into a vector.
|
||||||
// TODO: This could be made much more efficient if we kept a sorted list of selected dives!
|
// TODO: This could be made much more efficient if we kept a sorted list of selected dives!
|
||||||
static std::vector<dive *> getDiveSelection()
|
static std::vector<dive *> getDiveSelection()
|
||||||
|
|
|
@ -52,8 +52,6 @@ struct DivesToTrip
|
||||||
// flag accordingly.
|
// flag accordingly.
|
||||||
class DiveListBase : public Base {
|
class DiveListBase : public Base {
|
||||||
protected:
|
protected:
|
||||||
DiveListBase();
|
|
||||||
|
|
||||||
// These are helper functions to add / remove dive from the C-core structures,
|
// These are helper functions to add / remove dive from the C-core structures,
|
||||||
// which set the selectionChanged flag if the added / removed dive was selected.
|
// which set the selectionChanged flag if the added / removed dive was selected.
|
||||||
DiveToAdd removeDive(struct dive *d, std::vector<OwningTripPtr> &tripsToAdd);
|
DiveToAdd removeDive(struct dive *d, std::vector<OwningTripPtr> &tripsToAdd);
|
||||||
|
@ -64,13 +62,6 @@ protected:
|
||||||
// Set the selection to a given state. Set the selectionChanged flag if anything changed.
|
// Set the selection to a given state. Set the selectionChanged flag if anything changed.
|
||||||
void restoreSelection(const std::vector<dive *> &selection, dive *currentDive);
|
void restoreSelection(const std::vector<dive *> &selection, dive *currentDive);
|
||||||
|
|
||||||
// On first execution, the selections before and after execution will
|
|
||||||
// be remembered. On all further executions, the selection will be reset to
|
|
||||||
// the remembered values.
|
|
||||||
// Note: Therefore, commands should manipulate the selection and send the
|
|
||||||
// corresponding signals only on first execution!
|
|
||||||
bool firstExecution;
|
|
||||||
|
|
||||||
// Commands set this flag if the selection changed on first execution.
|
// Commands set this flag if the selection changed on first execution.
|
||||||
// Only then, a new the divelist will be scanned again after the command.
|
// Only then, a new the divelist will be scanned again after the command.
|
||||||
// If this flag is set on first execution, a selectionChanged signal will
|
// If this flag is set on first execution, a selectionChanged signal will
|
||||||
|
|
Loading…
Add table
Reference in a new issue