Clone in a terminal:
Commit c5d4e01
Johan Mattsson - 2016-08-01T15:27:36+00:00
c5d4e01b80d9ef1707d0154d6e5c0de97724d9a0johan.mattsson.m@gmail.com

Ignore tripple clicks in OTF table

Changed files (1)

Diff

diff --git a/libbirdfont/OtfFeatureTable.vala b/libbirdfont/OtfFeatureTable.valaindex 0a60b25..37cbc7a 100644--- a/libbirdfont/OtfFeatureTable.vala+++ b/libbirdfont/OtfFeatureTable.vala@@ -34,11 +34,26 @@ public class OtfFeatureTable : Table { 	Gee.ArrayList<AlternateItem> undo_items; 	// FIXME: implement redo 	+	bool ignore_input = false;+	 	public OtfFeatureTable (GlyphCollection? gc) { 		glyph_collection = gc; 		undo_items = new Gee.ArrayList<AlternateItem> (); 	} +	public override void selected_canvas () {+		ignore_input = true; // make sure that tripple clicks in overview are ignored++		TimeoutSource input_delay = new TimeoutSource (250);+		input_delay.set_callback(() => {+			ignore_input = false;+			return false;+		});+		input_delay.attach (null);+		+		base.selected_canvas ();+	}+ 	public override Gee.ArrayList<Row> get_rows () { 		return rows; 	}@@ -49,6 +64,10 @@ public class OtfFeatureTable : Table { 		String s; 		AlternateItem a; 		+		if (ignore_input) {+			return;+		}+		 		if (row_index == SOURCE_GLYPH) { 			GlyphSelection gs = new GlyphSelection (); 			

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112