Solving issue 1769: "Single Editor mode: unnecessary thumbnail refresh when switching from tab to tab"
This commit is contained in:
parent
b038720e37
commit
744583f32b
@ -299,6 +299,8 @@ void RTWindow::on_mainNB_switch_page(GtkNotebookPage* page, guint page_num) {
|
|||||||
// Save profile on leaving the editor panel
|
// Save profile on leaving the editor panel
|
||||||
epanel->saveProfile();
|
epanel->saveProfile();
|
||||||
|
|
||||||
|
// Moving the FileBrowser only if the user has switched to the FileBrowser tab
|
||||||
|
if (page_num==0)
|
||||||
MoveFileBrowserToMain();
|
MoveFileBrowserToMain();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,12 @@ void ThumbBrowserEntryBase::updateBackBuffer () {
|
|||||||
|
|
||||||
Gtk::Widget* w = parent->getDrawingArea ();
|
Gtk::Widget* w = parent->getDrawingArea ();
|
||||||
|
|
||||||
backBuffer = Gdk::Pixmap::create (w->get_window(), exp_width, exp_height);
|
Glib::RefPtr<Gdk::Window> win = w->get_window();
|
||||||
|
if (!win)
|
||||||
|
// Nothing to draw on, so we return
|
||||||
|
return;
|
||||||
|
|
||||||
|
backBuffer = Gdk::Pixmap::create (win, exp_width, exp_height);
|
||||||
|
|
||||||
// If thumbnail is hidden by a filter drawing to it will crash
|
// If thumbnail is hidden by a filter drawing to it will crash
|
||||||
int backbuffer_w=0, backbuffer_h=0;
|
int backbuffer_w=0, backbuffer_h=0;
|
||||||
|
@ -138,7 +138,7 @@ public:
|
|||||||
|
|
||||||
// remove so not run again
|
// remove so not run again
|
||||||
jobs_.erase(i);
|
jobs_.erase(i);
|
||||||
DEBUG("%d job(s) remaining",jobs_.size());
|
DEBUG("%d job(s) remaining", int(jobs_.size()) );
|
||||||
|
|
||||||
++active_;
|
++active_;
|
||||||
}
|
}
|
||||||
@ -215,7 +215,7 @@ ThumbImageUpdater::add(ThumbBrowserEntryBase* tbe, bool* priority, bool upgrade,
|
|||||||
i->listener_ == l &&
|
i->listener_ == l &&
|
||||||
i->upgrade_ == upgrade )
|
i->upgrade_ == upgrade )
|
||||||
{
|
{
|
||||||
DEBUG("updating job %s",tbe->getFileName().c_str());
|
DEBUG("updating job %s",tbe->shortname.c_str());
|
||||||
// we have one, update queue entry, will be picked up by thread when processed
|
// we have one, update queue entry, will be picked up by thread when processed
|
||||||
/*i->pparams_ = params;
|
/*i->pparams_ = params;
|
||||||
i->height_ = height; */
|
i->height_ = height; */
|
||||||
@ -225,10 +225,10 @@ ThumbImageUpdater::add(ThumbBrowserEntryBase* tbe, bool* priority, bool upgrade,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create a new job and append to queue
|
// create a new job and append to queue
|
||||||
DEBUG("queing job %s",t->getFileName().c_str());
|
DEBUG("queing job %s",tbe->shortname.c_str());
|
||||||
impl_->jobs_.push_back(Impl::Job(tbe,priority,upgrade,l));
|
impl_->jobs_.push_back(Impl::Job(tbe,priority,upgrade,l));
|
||||||
|
|
||||||
DEBUG("adding run request %s",t->getFileName().c_str());
|
DEBUG("adding run request %s",tbe->shortname.c_str());
|
||||||
impl_->threadPool_->push(sigc::mem_fun(*impl_, &ThumbImageUpdater::Impl::processNextJob));
|
impl_->threadPool_->push(sigc::mem_fun(*impl_, &ThumbImageUpdater::Impl::processNextJob));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user