File tree Expand file tree Collapse file tree 4 files changed +19
-3
lines changed Expand file tree Collapse file tree 4 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,11 @@ class NumberSettingNodeV3 : public SettingValueNodeV3<S> {
222
222
this ->setValue (value, static_cast <CCNode*>(sender));
223
223
}
224
224
void onSlider (CCObject*) {
225
- this ->setValue (this ->valueFromSlider (m_slider->m_touchLogic ->m_thumb ->getValue ()), m_slider);
225
+ auto value = this ->valueFromSlider (m_slider->m_touchLogic ->m_thumb ->getValue ());
226
+
227
+ if (value != this ->getValue ()) {
228
+ this ->setValue (value, m_slider);
229
+ }
226
230
}
227
231
228
232
public:
Original file line number Diff line number Diff line change 4
4
#include < Geode/ui/BasedButtonSprite.hpp>
5
5
#include < Geode/utils/file.hpp>
6
6
#include < Geode/cocos/cocoa/CCObject.h>
7
+ #include < Geode/loader/Event.hpp>
7
8
#include " SwelvyBG.hpp"
8
9
#include < Geode/ui/TextInput.hpp>
9
10
#include < Geode/utils/ColorProvider.hpp>
@@ -91,6 +92,9 @@ bool ModsStatusNode::init() {
91
92
m_downloadListener.bind ([this ](auto ) { this ->updateState (); });
92
93
93
94
m_settingNodeListener.bind ([this ](SettingNodeValueChangeEvent* ev) {
95
+ if (!ev->isCommit ()) {
96
+ return ListenerResult::Propagate;
97
+ }
94
98
this ->updateState ();
95
99
return ListenerResult::Propagate;
96
100
});
Original file line number Diff line number Diff line change 7
7
#include < Geode/ui/GeodeUI.hpp>
8
8
#include < Geode/utils/ColorProvider.hpp>
9
9
#include < Geode/binding/ButtonSprite.hpp>
10
+ #include < Geode/loader/Event.hpp>
10
11
#include < Geode/loader/Loader.hpp>
11
12
#include " server/DownloadManager.hpp"
12
13
#include " ui/mods/GeodeStyle.hpp"
@@ -350,7 +351,10 @@ bool ModItem::init(ModSource&& source) {
350
351
m_downloadListener.bind ([this ](auto ) { this ->updateState (); });
351
352
m_downloadListener.setFilter (server::ModDownloadFilter (m_source.getID ()));
352
353
353
- m_settingNodeListener.bind ([this ](SettingNodeValueChangeEvent*) {
354
+ m_settingNodeListener.bind ([this ](SettingNodeValueChangeEvent* ev) {
355
+ if (!ev->isCommit ()) {
356
+ return ListenerResult::Propagate;
357
+ }
354
358
this ->updateState ();
355
359
return ListenerResult::Propagate;
356
360
});
Original file line number Diff line number Diff line change 6
6
#include < Geode/ui/MDTextArea.hpp>
7
7
#include < Geode/ui/TextInput.hpp>
8
8
#include < Geode/utils/web.hpp>
9
+ #include < Geode/loader/Event.hpp>
9
10
#include < Geode/loader/Loader.hpp>
10
11
#include < Geode/loader/ModSettingsManager.hpp>
11
12
#include < Geode/ui/GeodeUI.hpp>
@@ -646,7 +647,10 @@ bool ModPopup::setup(ModSource&& src) {
646
647
m_downloadListener.bind ([this ](auto ) { this ->updateState (); });
647
648
m_downloadListener.setFilter (m_source.getID ());
648
649
649
- m_settingNodeListener.bind ([this ](SettingNodeValueChangeEvent*) {
650
+ m_settingNodeListener.bind ([this ](SettingNodeValueChangeEvent* ev) {
651
+ if (!ev->isCommit ()) {
652
+ return ListenerResult::Propagate;
653
+ }
650
654
this ->updateState ();
651
655
return ListenerResult::Propagate;
652
656
});
You can’t perform that action at this time.
0 commit comments