src/LavaVu.cpp
void LavaVu::resetViews(bool autozoom)
{
  //Copy active view state props to dictionary
  aview->exportProps();
  viewset = RESET_NO;

  //Setup view(s) for new model dimensions
  int curview = view;
  for (unsigned int v=0; v < amodel->views.size(); v++)
    viewSelect(v, true, autozoom);
  //Restore active
  viewSelect(curview);

  //Flag redraw required
  amodel->redraw();

  //Set viewer title
  std::stringstream title;
  std::string name = session.global("caption");
  std::string vptitle = aview->properties["title"];
  if (vptitle.length() > 0)
    title << vptitle;
  else
    title << "LavaVu";
  if (name.length() > 0)
    title << " (" << name << ")";

  if (amodel->timesteps.size() > 1)
    title << " - timestep " << std::setw(5) << std::setfill('0') << amodel->stepInfo();

  //Update title
  viewer->title(title.str());

  //Apply any prop changes to active view state
  aview->importProps();
}
//Called when model loaded/changed, updates all views settings
Called when model loaded/changed, updates all views settings
Called when model loaded / changed updates all views settings
void LavaVu::resetViews(bool autozoom)
{
  aview->exportProps();
  viewset = RESET_NO;
  int curview = view;
  for (unsigned int v=0; v < amodel->views.size(); v++)
    viewSelect(v, true, autozoom);
  viewSelect(curview);
  amodel->redraw();
  std::stringstream title;
  std::string name = session.global("caption");
  std::string vptitle = aview->properties["title"];
  if (vptitle.length() > 0)
    title << vptitle;
  else
    title << "LavaVu";
  if (name.length() > 0)
    title << " (" << name << ")";
  if (amodel->timesteps.size() > 1)
    title << " - timestep " << std::setw(5) << std::setfill('0') << amodel->stepInfo();
  viewer->title(title.str());
  aview->importProps();
}
void LavaVu :: resetViews ( bool autozoom ) { aview -> exportProps ( ) ; viewset = RESET_NO ; int curview = view ; for ( unsigned int v = 0 ; v < amodel -> views . size ( ) ; v ++ ) viewSelect ( v , true , autozoom ) ; viewSelect ( curview ) ; amodel -> redraw ( ) ; std :: stringstream title ; std :: string name = session . global ( " " ) ; std :: string vptitle = aview -> properties [ " " ] ; if ( vptitle . length ( ) > 0 ) title << vptitle ; else title << " " ; if ( name . length ( ) > 0 ) title << " " << name << " " ; if ( amodel -> timesteps . size ( ) > 1 ) title << " " << std :: setw ( 5 ) << std :: setfill ( ' ' ) << amodel -> stepInfo ( ) ; viewer -> title ( title . str ( ) ) ; aview -> importProps ( ) ; }
Called when model loaded/changed, updates all views settings
Called when model loaded / changed updates all views settings
//Copy active view state props to dictionary //Setup view(s) for new model dimensions //Restore active //Flag redraw required //Set viewer title //Update title //Apply any prop changes to active view state