comparison libinterp/corefcn/graphics.cc @ 17608:e7692efcbd0d

graphics.cc: don't ask for (orphan) dummy axes parent properties. * axes::properties::get_boundingbox : get default figure size if parent object is invalid (Bug # 39371)
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Tue, 08 Oct 2013 23:18:17 +0200
parents 07a4597fcbac
children 82b1778798d3
comparison
equal deleted inserted replaced
17607:07a4597fcbac 17608:e7692efcbd0d
7667 7667
7668 if (parent_size.numel () == 0) 7668 if (parent_size.numel () == 0)
7669 { 7669 {
7670 graphics_object obj = gh_manager::get_object (get_parent ()); 7670 graphics_object obj = gh_manager::get_object (get_parent ());
7671 7671
7672 parent_size = 7672 if (obj.valid_object ())
7673 obj.get_properties ().get_boundingbox (true).extract_n (0, 2, 1, 2); 7673 parent_size =
7674 obj.get_properties ().get_boundingbox (true).extract_n (0, 2, 1, 2);
7675 else
7676 parent_size = default_figure_position ();
7674 } 7677 }
7675 7678
7676 pos = convert_position (pos, get_units (), "pixels", parent_size); 7679 pos = convert_position (pos, get_units (), "pixels", parent_size);
7677 7680
7678 pos(0)--; 7681 pos(0)--;