mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
don't reset habit position when editing it
This commit is contained in:
@@ -171,6 +171,8 @@ public class EditHabitDialog extends AppCompatDialogFragment
|
|||||||
if (type == Habit.NUMBER_HABIT && !targetPanel.validate()) return;
|
if (type == Habit.NUMBER_HABIT && !targetPanel.validate()) return;
|
||||||
|
|
||||||
Habit habit = modelFactory.buildHabit();
|
Habit habit = modelFactory.buildHabit();
|
||||||
|
if( originalHabit != null )
|
||||||
|
habit.copyFrom(originalHabit);
|
||||||
habit.setName(namePanel.getName());
|
habit.setName(namePanel.getName());
|
||||||
habit.setDescription(namePanel.getDescription());
|
habit.setDescription(namePanel.getDescription());
|
||||||
habit.setColor(namePanel.getColor());
|
habit.setColor(namePanel.getColor());
|
||||||
|
|||||||
Reference in New Issue
Block a user