mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Make the new grfx::Loader copy c-tor work "in expected fashion". Sheesh that took some tracking down.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7106 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a89f41c028
commit
c2933d528f
@ -1,3 +1,7 @@
|
||||
2003-06-04 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* GraphicsLoader.C (Loader copy c-tor): make it work as expected. ;-)
|
||||
|
||||
2003-06-03 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* GraphicsLoader.[Ch] (Loader): add copy constructor.
|
||||
|
@ -79,15 +79,18 @@ Loader::Loader(string const & file, DisplayType type)
|
||||
|
||||
|
||||
Loader::Loader(string const & file, Params const & params)
|
||||
: pimpl_(new Impl(params))
|
||||
: pimpl_(new Impl(Params()))
|
||||
{
|
||||
reset(file, params);
|
||||
}
|
||||
|
||||
|
||||
Loader::Loader(Loader const & other)
|
||||
: pimpl_(new Impl(other.pimpl_->params()))
|
||||
{}
|
||||
: pimpl_(new Impl(Params()))
|
||||
{
|
||||
Params const & params = other.pimpl_->params();
|
||||
reset(params.filename, params);
|
||||
}
|
||||
|
||||
|
||||
Loader::~Loader()
|
||||
@ -274,7 +277,6 @@ void Loader::Impl::createPixmap()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Loader::Impl::startLoading()
|
||||
{
|
||||
if (status_ != WaitingToLoad)
|
||||
|
@ -1,3 +1,7 @@
|
||||
2003-06-04 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* graphicinset.C (draw): add a comment for the #if 0 block.
|
||||
|
||||
2003-06-04 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
* inset.[Ch]: change owner_ from Inset * to UpdatableInset *
|
||||
|
@ -43,9 +43,9 @@ void GraphicInset::update(grfx::Params const & params)
|
||||
{
|
||||
params_ = params;
|
||||
|
||||
if (!params.filename.empty()) {
|
||||
lyx::Assert(AbsolutePath(params.filename));
|
||||
loader_.reset(params.filename, params);
|
||||
if (!params_.filename.empty()) {
|
||||
lyx::Assert(AbsolutePath(params_.filename));
|
||||
loader_.reset(params_.filename, params_);
|
||||
}
|
||||
}
|
||||
|
||||
@ -194,6 +194,9 @@ void GraphicInset::draw(PainterInfo & pi, int x, int y) const
|
||||
view(pi.base.bv);
|
||||
|
||||
#if 0
|
||||
// Comment this out and see if anything goes wrong.
|
||||
// The explanation for why it _was_ needed once upon a time is below.
|
||||
|
||||
// MakeAbsPath returns filename_ unchanged if it is absolute
|
||||
// already.
|
||||
string const file_with_path =
|
||||
@ -219,7 +222,7 @@ void GraphicInset::draw(PainterInfo & pi, int x, int y) const
|
||||
loader_.status() == grfx::WaitingToLoad)
|
||||
loader_.startLoading();
|
||||
|
||||
if (!loader_.monitoring())
|
||||
if (params_.display != grfx::NoDisplay && !loader_.monitoring())
|
||||
loader_.startMonitoring();
|
||||
|
||||
// This will draw the graphics. If the graphics has not been loaded yet,
|
||||
|
Loading…
Reference in New Issue
Block a user