File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5873,25 +5873,28 @@ std::string CMMCore::getCurrentPixelSizeConfig(bool cached) MMCORE_LEGACY_THROW(
58735873 const auto propName = cs.getPropertyName ();
58745874 if (!curState.isPropertyIncluded (deviceLabel.c_str (), propName.c_str ()))
58755875 {
5876- try
5876+ std::string value;
5877+ if (!cached)
58775878 {
5878- std::string value;
5879- if (!cached)
5879+ try
58805880 {
58815881 value = getProperty (deviceLabel.c_str (), propName.c_str ());
58825882 }
5883- else
5883+ catch (CMMError& err)
58845884 {
5885- value = stateCache_->getSetting (deviceLabel.c_str (), propName.c_str ())->getPropertyValue ();
5885+ logError (deviceLabel.c_str (), err.getMsg ().c_str ());
5886+ continue ;
58865887 }
5887- PropertySetting ss (deviceLabel.c_str (), propName.c_str (), value.c_str ()); // state setting
5888- curState.addSetting (ss);
58895888 }
5890- catch (CMMError& err)
5889+ else
58915890 {
5892- // just log error
5893- logError (deviceLabel.c_str (), err.getMsg ().c_str ());
5891+ auto s = stateCache_->getSetting (deviceLabel.c_str (), propName.c_str ());
5892+ if (!s)
5893+ continue ;
5894+ value = s->getPropertyValue ();
58945895 }
5896+ PropertySetting ss (deviceLabel.c_str (), propName.c_str (), value.c_str ()); // state setting
5897+ curState.addSetting (ss);
58955898 }
58965899 }
58975900 }
You can’t perform that action at this time.
0 commit comments