niepce r10 - in trunk: . src/niepce/ui
- From: hub svn gnome org
- To: svn-commits-list gnome org
- Subject: niepce r10 - in trunk: . src/niepce/ui
- Date: Thu, 29 Jan 2009 01:01:06 +0000 (UTC)
Author: hub
Date: Thu Jan 29 01:01:05 2009
New Revision: 10
URL: http://svn.gnome.org/viewvc/niepce?rev=10&view=rev
Log:
Test iterator for current selection before incrementing it
Modified:
trunk/ChangeLog
trunk/src/niepce/ui/selectioncontroller.cpp
Modified: trunk/src/niepce/ui/selectioncontroller.cpp
==============================================================================
--- trunk/src/niepce/ui/selectioncontroller.cpp (original)
+++ trunk/src/niepce/ui/selectioncontroller.cpp Thu Jan 29 01:01:05 2009
@@ -103,26 +103,28 @@
{
int selection = get_selection();
Gtk::TreeIter iter = m_imageliststore->get_iter_from_id(selection);
- if(backwards) {
- if(iter != m_imageliststore->children().begin()) {
- iter--;
- }
- }
- else {
- iter++;
- }
if(iter) {
- // make sure the iterator is valid...
- db::LibFile::Ptr libfile
- = (*iter)[m_imageliststore->columns().m_libfile];
- selection = libfile->id();
+ if(backwards) {
+ if(iter != m_imageliststore->children().begin()) {
+ iter--;
+ }
+ }
+ else {
+ iter++;
+ }
+ if(iter) {
+ // make sure the iterator is valid...
+ db::LibFile::Ptr libfile
+ = (*iter)[m_imageliststore->columns().m_libfile];
+ selection = libfile->id();
- utils::AutoFlag f(m_in_handler);
+ utils::AutoFlag f(m_in_handler);
- std::for_each(m_selectables.begin(), m_selectables.end(),
- boost::bind(&IImageSelectable::select_image, _1,
- selection));
- signal_selected(selection);
+ std::for_each(m_selectables.begin(), m_selectables.end(),
+ boost::bind(&IImageSelectable::select_image, _1,
+ selection));
+ signal_selected(selection);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]