backport another post-release bugfix
[alioth/musescore.git] / debian / patches / upstream / undoable-spacer-drag-length.diff
1 Description: fix #291941: Changing spacer length with a mouse is not undoable
2 Author: Matt McClinch <mattmcclinch@gmail.com>
3 Origin: vendor, commit:1ba9e83aa1959e8aa8e895bec616174b8615a832
4 Applied-Upstream: master, commit:822c7e6be
5
6 --- a/libmscore/spacer.cpp
7 +++ b/libmscore/spacer.cpp
8 @@ -128,6 +128,16 @@ void Spacer::startEdit(EditData& ed)
9        }
10  
11  //---------------------------------------------------------
12 +//   startEditDrag
13 +//---------------------------------------------------------
14 +
15 +void Spacer::startEditDrag(EditData& ed)
16 +      {
17 +      ElementEditData* eed = ed.getData(this);
18 +      eed->pushProperty(Pid::SPACE);
19 +      }
20 +
21 +//---------------------------------------------------------
22  //   editDrag
23  //---------------------------------------------------------
24  
25 --- a/libmscore/spacer.h
26 +++ b/libmscore/spacer.h
27 @@ -51,6 +51,7 @@ class Spacer final : public Element {
28        virtual void draw(QPainter*) const;
29        virtual bool isEditable() const { return true; }
30        virtual void startEdit(EditData&) override;
31 +      virtual void startEditDrag(EditData&) override;
32        virtual void editDrag(EditData&) override;
33        virtual void updateGrips(EditData&) const override;
34        virtual void spatiumChanged(qreal, qreal);