OpenToonz - An open-source full-featured 2D animation creation software
C
added shun-iwasawa's suggestions
Jeremy Bullockb99ed3bab602
diff --git a/toonz/sources/common/tunit/tunit.cpp b/toonz/sources/common/tunit/tunit.cppindex 9c1f2ee2b..46efe326a 100644--- a/toonz/sources/common/tunit/tunit.cpp+++ b/toonz/sources/common/tunit/tunit.cpp@@ -347,22 +347,27 @@ TMeasureManager::TMeasureManager() {m->add(cameraYFld.clone());add(m);+ const double stage_inch = 53.33333; //Stage::inch+TUnit fxLength(L"fxLength"),- fxInch(L"in", new TSimpleUnitConverter(1 / 53.33333)),- fxCm(L"cm", new TSimpleUnitConverter(2.54 / 53.33333)),- fxMm(L"mm", new TSimpleUnitConverter(25.4 / 53.33333)),- fxXfld(L"fld", new TSimpleUnitConverter(2 / 53.33333));+ fxInch(L"in", new TSimpleUnitConverter(1 / stage_inch)),+ fxCm(L"cm", new TSimpleUnitConverter(2.54 / stage_inch)),+ fxMm(L"mm", new TSimpleUnitConverter(25.4 / stage_inch)),+ fxXfld(L"fld", new TSimpleUnitConverter(2 / stage_inch)),+ fxPx(L"px", new TSimpleUnitConverter(1));fxInch.addExtension(L"inch");fxInch.addExtension(L"\"");fxInch.addExtension(L"''");fxInch.setDefaultExtension(L"\"");fxXfld.addExtension(L"field");fxXfld.addExtension(L"F");+ fxXfld.addExtension(L"pixel");m = new TMeasure("fxLength", fxLength.clone());m->add(fxInch.clone());m->add(fxCm.clone());m->add(fxMm.clone());m->add(fxXfld.clone());+ m->add(fxPx.clone());add(m);m = new TMeasure("angle", degree.clone());diff --git a/toonz/sources/toonz/preferencespopup.cpp b/toonz/sources/toonz/preferencespopup.cppindex 501a4a59f..fc8b3eff2 100644--- a/toonz/sources/toonz/preferencespopup.cpp+++ b/toonz/sources/toonz/preferencespopup.cpp@@ -883,6 +883,10 @@ PreferencesPopup::PreferencesPopup()new CheckBox(tr("All imported images will use the same DPI"), this);m_unitOm = new QComboBox(this);m_cameraUnitOm = new QComboBox(this);+ if (m_pref->getPixelsOnly()){+ m_unitOm->setDisabled(true);+ m_cameraUnitOm->setDisabled(true);+ }// Choose between standard and Studio Ghibli roomsQComboBox *roomChoice = new QComboBox(this);diff --git a/toonz/sources/toonzlib/preferences.cpp b/toonz/sources/toonzlib/preferences.cppindex f728ed2b8..83ce957d8 100644--- a/toonz/sources/toonzlib/preferences.cpp+++ b/toonz/sources/toonzlib/preferences.cpp@@ -377,10 +377,10 @@ Preferences::Preferences()//for Pixels onlyQString units;- units = m_settings->value("oldUnits").toString();+ units = m_settings->value("oldUnits", m_units).toString();m_oldUnits = units;- units = m_settings->value("oldCameraUnits").toString();+ units = m_settings->value("oldCameraUnits", m_cameraUnits).toString();m_oldCameraUnits = units;//end for pixels only