From ae91bcdbb542c5e7233b0d33f8aba42439408587 Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Sun, 7 May 2017 02:23:42 +0200 Subject: Reorder LPE enum to match definition in effect.cpp. also fix a bug pointed by Ede_123 in IRC, LPE dialog show bad default selected LPE (bzr r15670) --- src/ui/dialog/livepatheffect-add.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/ui') diff --git a/src/ui/dialog/livepatheffect-add.cpp b/src/ui/dialog/livepatheffect-add.cpp index cada915c9..ba9d33f0a 100644 --- a/src/ui/dialog/livepatheffect-add.cpp +++ b/src/ui/dialog/livepatheffect-add.cpp @@ -52,13 +52,21 @@ LivePathEffectAdd::LivePathEffectAdd() : /** * Initialize Effect list */ + int show = LivePathEffect::ATTACH_PATH; +#ifdef LPE_ENABLE_TEST_EFFECTS + //TODO: Handle when showing the experimental effects without setting flag + show = LivePathEffect::ANGLE_BISECTOR; +#elif WITH_LPETOOL + //TODO: Handle when showing the experimental effects without setting flag + show = LivePathEffect::ANGLE_BISECTOR; +#endif + for(int i = 0; i < static_cast(converter._length); ++i) { Gtk::TreeModel::Row row = *(effectlist_store->append()); const Util::EnumData* data = &converter.data(i); row[_columns.name] = _( converter.get_label(data->id).c_str() ); row[_columns.data] = data; - - if (i == 0) { + if (i == show) { Glib::RefPtr select = effectlist_treeview.get_selection(); select->select(row); } -- cgit v1.2.3