Sigh. Why is debugging iterative?

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3907 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-04-05 09:18:26 +00:00
parent b9a7e87405
commit 9844394f76
4 changed files with 15 additions and 7 deletions

View 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> 2002-04-04 Angus Leeming <a.leeming@ic.ac.uk>
* ControlGraphics.C (readBB): Don't open the ifstrem and then * ControlGraphics.C (readBB): Don't open the ifstrem and then

View File

@ -111,7 +111,7 @@ string const ControlGraphics::readBB(string const & file)
// end of the file. Than we have in the header: // end of the file. Than we have in the header:
// %%BoundingBox: (atend) // %%BoundingBox: (atend)
// In this case we must check the end. // In this case we must check the end.
string file_ = file; string file_ = MakeAbsPath(file, lv_.buffer()->filePath());
if (zippedFile(file_)) if (zippedFile(file_))
file_ = unzipFile(file_); file_ = unzipFile(file_);

View 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> 2002-04-04 Angus Leeming <a.leeming@ic.ac.uk>
* xformsGImage.C (clip): ensure that the clipped image has sensible * xformsGImage.C (clip): ensure that the clipped image has sensible

View File

@ -433,9 +433,7 @@ void FormGraphics::updateBB(string const & filename, string const & bb_inset)
controller().bbChanged = false; controller().bbChanged = false;
if (bb_inset.empty()) { if (bb_inset.empty()) {
lyxerr[Debug::GRAPHICS] << "update:: no BoundingBox" << endl; lyxerr[Debug::GRAPHICS] << "update:: no BoundingBox" << endl;
string const fileWithAbsPath = string const bb = controller().readBB(filename);
MakeAbsPath(filename, OnlyPath(filename));
string const bb = controller().readBB(fileWithAbsPath);
if (!bb.empty()) { if (!bb.empty()) {
// get the values from the file // get the values from the file
// in this case we always have the point-unit // 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) { } else if (ob == bbox_->button_getBB) {
string const filename = getStringFromInput(file_->input_filename); string const filename = getStringFromInput(file_->input_filename);
if (!filename.empty()) { if (!filename.empty()) {
string const fileWithAbsPath = MakeAbsPath(filename, OnlyPath(filename)); string bb = controller().readBB(filename);
string bb = controller().readBB(fileWithAbsPath);
if (!bb.empty()) { if (!bb.empty()) {
fl_set_input(bbox_->input_bb_x0, token(bb,' ',0).c_str()); fl_set_input(bbox_->input_bb_x0, token(bb,' ',0).c_str());
fl_set_input(bbox_->input_bb_y0, token(bb,' ',1).c_str()); fl_set_input(bbox_->input_bb_y0, token(bb,' ',1).c_str());