Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue #61146, behavoir of the Reset value button in Inspector #2011

Merged
merged 2 commits into from
May 27, 2015

Conversation

Jojo-Schmitz
Copy link
Contributor

No description provided.

@Jojo-Schmitz Jojo-Schmitz force-pushed the reset-value branch 2 times, most recently from 29ac4cd to 483b9f1 Compare May 19, 2015 15:05
@Jojo-Schmitz Jojo-Schmitz changed the title issue #61146, behavoir if the Reset value button in Inspector issue #61146, behavoir of the Reset value button in Inspector May 19, 2015
@@ -236,7 +236,7 @@ QVariant TempoText::propertyDefault(P_ID id) const
{
switch(id) {
case P_ID::TEMPO: return 2.0;
case P_ID::TEMPO_FOLLOW_TEXT: return false;
case P_ID::TEMPO_FOLLOW_TEXT: return true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay to come back to this, but I don't get why we need to change the default for this property. Also, changing it here but not in the constructor doesn't look elegant. Is it really needed to change the default? Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because if you take a tempo text from the palette, it has the 'reset value' button enabled. I think TEMPO_FOLLOW_TEXT being set to true is a sane default. Setting it in constructor too though causes many test failures and you (rightfully) complained about those ;-)
Also this seems to be a backward compatibility thing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For properties, the default behavior is to not write them to MSCZ files if they aren't default. Apparently for this one, we don't use writeProperty and we will write it only if "true". Then, when we read, it's set to false in the constructor, and read from the file to be set to true if necessary.

If we change the default to true here, we loose the opportunity to call write/read property for this property :-(
So I'd vote for keeping default to false, and use writeProperty/readProperty as it should be. It's more symmetric.
From a user perspective, it changes nothing since tempo from palette or via Create > Text > Tempo are created with the followtext. The only thing, it's not the default so reset is enabled. Not a problem to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, we could uncomment the tt.resetFollowText->setDisabled(followText); in InspectorTempText::postInit() to solve the reset button being enabled on those tempo texts.
Well, it does only partly, toggling 'follow text' also toggles the reset button's availabilitly, but using the latter doesn't change the former, which is as bad as not solving it...

Where (and how) to use those writeProperty/readProperty? Or would that be in a separate change anyway?

Dafault for "follow text" remains false, so the 'reset value' button
remains enabled tor tempo texts taken from the palette.

Still the tempo setting is used, even if 'Follow Text' is enabled and
the that text says something entirely different.
lasconic added a commit that referenced this pull request May 27, 2015
issue #61146, behavoir of the Reset value button in Inspector
@lasconic lasconic merged commit 2b5879a into musescore:master May 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants