File tree Expand file tree Collapse file tree 2 files changed +18
-9
lines changed
libprojectM/MilkdropPresetFactory Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -160,18 +160,22 @@ float TreeExpr::eval_tree_expr ( int mesh_i, int mesh_j )
160160 /* Safe guard in case the user gave a partially written expression */
161161 if (left == NULL ) {
162162 if (infix_op == Eval::infix_mult)
163- return 1 ;
163+ left_arg = 1 ;
164164 else
165- return 0 ;
165+ left_arg = 0 ;
166166 }
167+ else
168+ left_arg = left->eval_tree_expr ( mesh_i, mesh_j );
167169
168- left_arg = left->eval_tree_expr ( mesh_i, mesh_j );
169-
170- /* Safe guard */
171- if (right == NULL )
172- return left_arg;
173-
174- right_arg = right->eval_tree_expr ( mesh_i, mesh_j );
170+ /* Safe guard in case the user gave a partially written expression */
171+ if (right == NULL ) {
172+ if (infix_op == Eval::infix_mult)
173+ right_arg = 1 ;
174+ else
175+ right_arg = 0 ;
176+ }
177+ else
178+ right_arg = right->eval_tree_expr ( mesh_i, mesh_j );
175179
176180
177181 switch ( infix_op->type )
Original file line number Diff line number Diff line change @@ -35,13 +35,18 @@ class QProjectM : public QObject, public projectM {
3535 presetSwitchedSignal (hardCut, index);
3636 }
3737
38+ void presetSwitchFailedEvent (bool hardCut, unsigned int index, const std::string & message) const {
39+ presetSwitchFailedSignal (hardCut, index, message);
40+ }
41+
3842 void presetRatingChanged (unsigned int index, int rating,
3943 PresetRatingType ratingType) const {
4044 presetRatingChangedSignal (index, rating, ratingType);
4145 }
4246
4347 signals:
4448 void presetSwitchedSignal (bool hardCut, unsigned int index) const ;
49+ void presetSwitchFailedSignal (bool hardCut, unsigned int index, const std::string & message) const ;
4550 void presetRatingChangedSignal (unsigned int index, int rating,
4651 PresetRatingType ratingType) const ;
4752
You can’t perform that action at this time.
0 commit comments