[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #35511] reset (h) function doesn't work at all

From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #35511] reset (h) function doesn't work at all
Date: Tue, 18 Feb 2014 13:42:40 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0

Follow-up Comment #3, bug #35511 (project octave):

Dan, the default_properties attribute you are talking about, which only parent
objects have (uitoolbar, root, figure, axes), is meant to store "local"
defaults, i.e when you do:

figure (1);
set (1, "defaultaxeslinewidth", 1)
get (1, "default")

The default property is stored in figure(1)'s default_properties and will
apply only to its axes children. The mechanism works well and is based on the
use of override_defaults function.

The static function (reset_default_properties) that is called by
reset_default_properties methods is not doing anything useful and should be

I have attached a proof of concept of what I think should be done by
reset_default_properties methods. Basically the work flow is:
 - local defaults must be emptied if they exist (parent objects only)
 - reset all properties but read only and those that should not be reset
according to matlab doc. This may be done in the method itself or via
properties::set_defaults when it's defined
 - override with parent defaults (except for root)

With this patch the following works as expected:

figure (1);
set (1, "position", [100 100 560 420])
set (1, "color", [.5 .5 .5])
plot (5:10);
reset (1) ## reset figure's color but not position as per ML doc
set (0, "defaultfigurecolor", [.5 .5 .5])
reset (1) ## reset figure's color to parent's default

Can someone confirm this is the good interpretation/approach ?

(file #30595)

Additional Item Attachment:

File name: reset_poc_bug35511.patch       Size:3 KB


Reply to this item at:


  Message posté via/par Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]