Changeset 2827 for branches/plotter2


Ignore:
Timestamp:
07/27/13 01:23:26 (11 years ago)
Author:
WataruKawasaki
Message:

New Development: No

JIRA Issue: Yes CAS-3620

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes: No

Module(s): sd

Description: modified plotter2.save() so that the previous filename and device are restored finally.


Location:
branches/plotter2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/plotter2/python/plotter2.py

    r2825 r2827  
    215215
    216216    def save(self, filename):
     217        prev_filename = self._plotter.get_filename()
     218        prev_dev      = self._plotter.get_device()
     219
    217220        self.set_output(filename)
    218221        self.plot()
     222       
     223        self.set_output(prev_filename, prev_dev)
    219224   
    220225    def get_vinfo(self):
  • branches/plotter2/src/Plotter2.cpp

    r2825 r2827  
    270270}
    271271
     272std::string Plotter2::getFileName() {
     273    return filename;
     274}
     275
    272276void Plotter2::setFileName(const std::string& inFilename) {
    273277    filename = inFilename;
     278}
     279
     280std::string Plotter2::getDevice() {
     281    return device;
    274282}
    275283
  • branches/plotter2/src/Plotter2.h

    r2825 r2827  
    158158    ~Plotter2();
    159159
     160    std::string getFileName();
    160161    void setFileName(const std::string& inFilename);
     162    std::string getDevice();
    161163    void setDevice(const std::string& inDevice);
    162164
  • branches/plotter2/src/python_Plotter2.cpp

    r2825 r2827  
    4040       class_<Plotter2>("Plotter2")
    4141         .def( init <> () )
     42         .def("get_filename",&Plotter2::getFileName)
    4243         .def("set_filename",&Plotter2::setFileName)
     44         .def("get_device",&Plotter2::getDevice)
    4345         .def("set_device",&Plotter2::setDevice)
    4446         .def("add_viewport",&Plotter2::addViewport)
Note: See TracChangeset for help on using the changeset viewer.