From 9844394f76a5997e9534db004e28e76faf584be9 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Fri, 5 Apr 2002 09:18:26 +0000 Subject: [PATCH] Sigh. Why is debugging iterative? git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3907 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/controllers/ChangeLog | 5 +++++ src/frontends/controllers/ControlGraphics.C | 4 ++-- src/frontends/xforms/ChangeLog | 6 ++++++ src/frontends/xforms/FormGraphics.C | 7 ++----- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index da02712894..fc898d6e00 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,8 @@ +2002-04-05 Angus Leeming + + * ControlGraphics.C (readBB): sigh. Make sure that the correct path is + used when reading the BB. + 2002-04-04 Angus Leeming * ControlGraphics.C (readBB): Don't open the ifstrem and then diff --git a/src/frontends/controllers/ControlGraphics.C b/src/frontends/controllers/ControlGraphics.C index 6c1454fc13..6c42c5f5cb 100644 --- a/src/frontends/controllers/ControlGraphics.C +++ b/src/frontends/controllers/ControlGraphics.C @@ -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") diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 07bbd9ed81..82210fc680 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,9 @@ +2002-04-05 Angus Leeming + + * 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 * xformsGImage.C (clip): ensure that the clipped image has sensible diff --git a/src/frontends/xforms/FormGraphics.C b/src/frontends/xforms/FormGraphics.C index 52713df6b8..31b9ff10d2 100644 --- a/src/frontends/xforms/FormGraphics.C +++ b/src/frontends/xforms/FormGraphics.C @@ -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()); -- 2.39.2