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
Fix Orientation parameter display on Text Tool Options Panel #2372
Conversation
This pull request introduces 4 alerts when merging 3c65d63 into 19a88f4 - view on LGTM.com new alerts:
|
3c65d63
to
d3adb7f
Compare
Last push fixed the LGTM above :) |
@@ -446,7 +446,7 @@ class SetsModel : public Gtk::TreeModel::ColumnRecord | |||
class Preferences : public synfigapp::Settings | |||
{ | |||
public: | |||
virtual bool get_value(const synfig::String& key, synfig::String& value)const | |||
virtual bool get_raw_value(const synfig::String& key, synfig::String& value)const override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI I renamed to avoid clashes and confusions with the new get_value
methods
set_feather_size(Distance( | ||
settings.get_value("bline.feather", 0.0), | ||
App::distance_system) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change inherits the bug already present in the released Synfig apps.
It ignores the unit system it was saved - that may different of current App preference...
Another PR should fix it
e7b8f8d
to
0dd3391
Compare
Rebased |
and they include a default_value argument
Let us restrict ChangeLocale usage. It can cause trouble for mixing current locale. This commit fixes a problem with Text Tool Options Panel with size and orientation Widget_Vector showing bizarre values regarding decimal separator in some non-English locales (example: Portuguese. Instead of "0,5" it shows "0.50000,00")
0dd3391
to
d163f00
Compare
Merged. Thank you! |
They are saved with current preferred unit, but units were ignored when loading. Many tools ignore the unit system a preference value was saved - that may be different of current App preference/setting when loaded... So, for example, 1 pixel can become the gigantic 1u (60px). Test it: In Preferences, assure the Unit System is 'Pixels' Select Bline Tool In Tool Options Panel, set Brush Size to 1.0 px Draw any Bline in Work Area Change to Normal Tool In Preferences, assure the Unit System is 'Units' (optional: close Synfig and reopen it) Select Bline Tool again Draw another Bline It's way thicker than before. If you check Tool Options Panel, you'll see Brush Size as 1.0u Mentioned first here: synfig#2372 (review)
They are saved with current preferred unit, but units were ignored when loading. Many tools ignore the unit system a preference value was saved - that may be different of current App preference/setting when loaded... So, for example, 1 pixel can become the gigantic 1u (60px). Test it: In Preferences, assure the Unit System is 'Pixels' Select Bline Tool In Tool Options Panel, set Brush Size to 1.0 px Draw any Bline in Work Area Change to Normal Tool In Preferences, assure the Unit System is 'Units' (optional: close Synfig and reopen it) Select Bline Tool again Draw another Bline It's way thicker than before. If you check Tool Options Panel, you'll see Brush Size as 1.0u Mentioned first here: #2372 (review)
The problem was the LC_NUMERIC locale was changed for loading preferences and the value was set on widget before changing back to proper locale.
This PR reduces the duration of the temporary locale change.