remve Undo::changeChordRestSize

This commit is contained in:
ws 2016-05-25 19:41:36 +02:00
parent 163afcfbc2
commit f1be263e2d
6 changed files with 9 additions and 50 deletions

View file

@ -1231,7 +1231,7 @@ void ChordRest::undoSetBeamMode(Beam::Mode mode)
QVariant ChordRest::getProperty(P_ID propertyId) const
{
switch(propertyId) {
switch (propertyId) {
case P_ID::SMALL: return QVariant(small());
case P_ID::BEAM_MODE: return int(beamMode());
case P_ID::STAFF_MOVE: return staffMove();
@ -1246,7 +1246,7 @@ QVariant ChordRest::getProperty(P_ID propertyId) const
bool ChordRest::setProperty(P_ID propertyId, const QVariant& v)
{
switch(propertyId) {
switch (propertyId) {
case P_ID::SMALL: setSmall(v.toBool()); break;
case P_ID::BEAM_MODE: setBeamMode(Beam::Mode(v.toInt())); break;
case P_ID::STAFF_MOVE: setStaffMove(v.toInt()); break;
@ -1270,7 +1270,7 @@ bool ChordRest::setProperty(P_ID propertyId, const QVariant& v)
QVariant ChordRest::propertyDefault(P_ID propertyId) const
{
switch(propertyId) {
switch (propertyId) {
case P_ID::SMALL: return false;
case P_ID::BEAM_MODE: return int(Beam::Mode::AUTO);
case P_ID::STAFF_MOVE: return 0;

View file

@ -576,7 +576,6 @@ class Score : public QObject, public ScoreElement {
void undoAddCR(ChordRest* element, Measure*, int tick);
void undoRemoveElement(Element* element);
void undoChangeElement(Element* oldElement, Element* newElement);
void undoChangeChordRestSize(ChordRest* cr, bool small);
void undoChangeChordNoStem(Chord* cr, bool noStem);
void undoChangePitch(Note* note, int pitch, int tpc1, int tpc2);
void undoChangeFretting(Note* note, int pitch, int string, int fret, int tpc1, int tpc2);

View file

@ -96,7 +96,7 @@ class Segment : public Element {
Spatium _extraLeadingSpace;
qreal _stretch;
int _tick;
int _tick; // tick offset to measure
int _ticks;
Type _segmentType { Type::Invalid };

View file

@ -777,15 +777,6 @@ void Score::undoInsertStaff(Staff* staff, int ridx, bool createRests)
//adjustBracketsIns(idx, idx+1);
}
//---------------------------------------------------------
// undoChangeChordRestSize
//---------------------------------------------------------
void Score::undoChangeChordRestSize(ChordRest* cr, bool small)
{
undo(new ChangeChordRestSize(cr, small));
}
//---------------------------------------------------------
// undoChangeChordNoStem
//---------------------------------------------------------
@ -2038,23 +2029,6 @@ void ChangeMeasureLen::flip()
len = oLen;
}
//---------------------------------------------------------
// ChangeChordRestSize
//---------------------------------------------------------
ChangeChordRestSize::ChangeChordRestSize(ChordRest* _cr, bool _small)
{
cr = _cr;
small = _small;
}
void ChangeChordRestSize::flip()
{
bool s = cr->small();
cr->setSmall(small);
small = s;
}
//---------------------------------------------------------
// ChangeChordNoStem
//---------------------------------------------------------

View file

@ -379,20 +379,6 @@ class ChangeElement : public UndoCommand {
UNDO_NAME("ChangeElement")
};
//---------------------------------------------------------
// ChangeChordRestSize
//---------------------------------------------------------
class ChangeChordRestSize : public UndoCommand {
ChordRest* cr;
bool small;
void flip();
public:
ChangeChordRestSize(ChordRest*, bool small);
UNDO_NAME("ChangeChordRestSize")
};
//---------------------------------------------------------
// ChangeChordNoStem
//---------------------------------------------------------

View file

@ -613,11 +613,11 @@ void EditStyle::setValues()
}
}
else if (!strcmp("Ms::Direction", type)) {
QComboBox* cb = qobject_cast<QComboBox*>(sw.widget);
if (cb)
cb->setCurrentIndex(int(lstyle.value(sw.idx).value<Direction>()));
else
abort();
QComboBox* cb = qobject_cast<QComboBox*>(sw.widget);
if (cb)
cb->setCurrentIndex(int(lstyle.value(sw.idx).value<Direction>()));
else
abort();
}
else {
qFatal("EditStyle::setValues: unhandled type <%s>", type);