]> git.lyx.org Git - features.git/commitdiff
Sigh. Why is debugging iterative?
authorAngus Leeming <leeming@lyx.org>
Fri, 5 Apr 2002 09:18:26 +0000 (09:18 +0000)
committerAngus Leeming <leeming@lyx.org>
Fri, 5 Apr 2002 09:18:26 +0000 (09:18 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3907 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/controllers/ChangeLog
src/frontends/controllers/ControlGraphics.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/FormGraphics.C

index da02712894abafb80c1d2145e981c9bfcb4f13c9..fc898d6e00de13d42c85bf01d60f7294a23b791c 100644 (file)
@@ -1,3 +1,8 @@
+2002-04-05  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * ControlGraphics.C (readBB): sigh. Make sure that the correct path is
+       used when reading the BB.
+
 2002-04-04  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * ControlGraphics.C (readBB): Don't open the ifstrem and then
index 6c1454fc13d7ed72ec6b2c3f48e9765af7217489..6c42c5f5cbca2249debc00ea54f023a6e77bf319 100644 (file)
@@ -111,9 +111,9 @@ string const ControlGraphics::readBB(string const & file)
        // end of the file. Than we have in the header:
        // %%BoundingBox: (atend)
        // In this case we must check the end.
-       string file_ = file;
+       string file_ = MakeAbsPath(file, lv_.buffer()->filePath());
        if (zippedFile(file_))
-           file_ = unzipFile(file_);
+               file_ = unzipFile(file_);
 
        string const format = getExtFromContents(file_);
        if (format != "eps" && format != "ps")
index 07bbd9ed814c63c6eb788aa603fd5c4d2d0a8134..82210fc6804b2f3fe08c828adf021fef117a5544 100644 (file)
@@ -1,3 +1,9 @@
+2002-04-05  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * FormGraphics.C (updateBB, input): Don't set the path of the file
+       passed to readBB. Let the controller do that because it knows about
+       the buffer (and therefore the path) whereas the view has no idea.
+
 2002-04-04  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * xformsGImage.C (clip): ensure that the clipped image has sensible
index 52713df6b88251a852ca2213a4aef7221bb4ab1e..31b9ff10d2d980be57e44b14f5bdf0a6d74068d2 100644 (file)
@@ -433,9 +433,7 @@ void FormGraphics::updateBB(string const & filename, string const & bb_inset)
        controller().bbChanged = false;
        if (bb_inset.empty()) {
                lyxerr[Debug::GRAPHICS] << "update:: no BoundingBox" << endl;
-               string const fileWithAbsPath =
-                       MakeAbsPath(filename, OnlyPath(filename));
-               string const bb = controller().readBB(fileWithAbsPath);
+               string const bb = controller().readBB(filename);
                if (!bb.empty()) {
                        // get the values from the file
                        // in this case we always have the point-unit
@@ -586,8 +584,7 @@ ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long)
        } else if (ob == bbox_->button_getBB) {
                string const filename = getStringFromInput(file_->input_filename);
                if (!filename.empty()) {
-                       string const fileWithAbsPath = MakeAbsPath(filename, OnlyPath(filename));
-                       string bb = controller().readBB(fileWithAbsPath);
+                       string bb = controller().readBB(filename);
                        if (!bb.empty()) {
                                fl_set_input(bbox_->input_bb_x0, token(bb,' ',0).c_str());
                                fl_set_input(bbox_->input_bb_y0, token(bb,' ',1).c_str());