Skip to content

Commit de703e5

Browse files
masterpigaTurboGit
authored andcommitted
Adds a configuration option to disable auto-centering of the filmstirp
1 parent d9b0c16 commit de703e5

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

data/darktableconfig.xml.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2492,6 +2492,13 @@
24922492
<shortdescription>show scrollbars for central view</shortdescription>
24932493
<longdescription>defines whether scrollbars should be displayed</longdescription>
24942494
</dtconfig>
2495+
<dtconfig>
2496+
<name>filmstrip/ui/auto_scroll</name>
2497+
<type>bool</type>
2498+
<default>true</default>
2499+
<shortdescription>auto-scroll filmstrip to selected image</shortdescription>
2500+
<longdescription>when enabled, the filmstrip automatically scrolls to center the newly selected image</longdescription>
2501+
</dtconfig>
24952502
<dtconfig prefs="lighttable" section="general">
24962503
<name>lighttable/ui/milliseconds</name>
24972504
<type>bool</type>

src/dtgtk/thumbtable.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1848,6 +1848,9 @@ static void _dt_active_images_callback(gpointer instance, dt_thumbtable_t *table
18481848
return;
18491849

18501850
if(!darktable.view_manager->active_images) return;
1851+
if(table->mode == DT_THUMBTABLE_MODE_FILMSTRIP
1852+
&& !dt_conf_get_bool("filmstrip/ui/auto_scroll"))
1853+
return;
18511854
const int activeid = GPOINTER_TO_INT(darktable.view_manager->active_images->data);
18521855
dt_thumbtable_set_offset_image(table, activeid, TRUE);
18531856
}

src/views/darkroom.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,8 @@ static void _view_darkroom_filmstrip_activate_callback(gpointer instance,
13391339

13401340
_dev_change_image(dev, imgid);
13411341
// move filmstrip
1342-
dt_thumbtable_set_offset_image(dt_ui_thumbtable(darktable.gui->ui), imgid, TRUE);
1342+
if(dt_conf_get_bool("filmstrip/ui/auto_scroll"))
1343+
dt_thumbtable_set_offset_image(dt_ui_thumbtable(darktable.gui->ui), imgid, TRUE);
13431344
// force redraw
13441345
dt_control_queue_redraw();
13451346
}

0 commit comments

Comments
 (0)