Commit 7b24b7a
committed
Fixed the bug #65.
Analysis:
This bug is there for following reasons.
1.ElectrodeButton for channels is directly added to the ChannelMappingEditor component.
2.When we drag the button we set the visibility of the lastHoverButton which makes it visible and shows on top of other components.
3. Also finding the correct button Logic is not proper as we are not considering the buttons which are scrolled up and invisible.
Solution:
1. Create Viewport for holding the ElectrodeButton for channels.
2. Also create a Holder Component to hold all ElectrodeButton.
3. Add the ElectrodeButton to Holder Component and set the size of the Holder Component to fit all buttons.
4. Set setViewPosition for Viewport based on the scroll and drag.
More Improvement:
1. We can remove upButton and downButton.
2. Viewport has its own scrolling which can be used for scrolling. Currently its been hidden using code "electrodeButtonViewport->setScrollBarsShown(false,false,true,true);"2 files changed
Lines changed: 40 additions & 18 deletions
Lines changed: 38 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
70 | 77 | | |
71 | 78 | | |
72 | 79 | | |
| |||
176 | 183 | | |
177 | 184 | | |
178 | 185 | | |
179 | | - | |
| 186 | + | |
180 | 187 | | |
181 | 188 | | |
182 | 189 | | |
| |||
230 | 237 | | |
231 | 238 | | |
232 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
233 | 243 | | |
234 | 244 | | |
235 | | - | |
| 245 | + | |
236 | 246 | | |
237 | | - | |
| 247 | + | |
| 248 | + | |
238 | 249 | | |
239 | 250 | | |
240 | | - | |
241 | 251 | | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
250 | 255 | | |
251 | 256 | | |
252 | | - | |
253 | | - | |
| 257 | + | |
| 258 | + | |
254 | 259 | | |
255 | 260 | | |
| 261 | + | |
256 | 262 | | |
257 | 263 | | |
258 | 264 | | |
| |||
774 | 780 | | |
775 | 781 | | |
776 | 782 | | |
777 | | - | |
778 | | - | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
779 | 800 | | |
780 | 801 | | |
781 | | - | |
782 | | - | |
| 802 | + | |
783 | 803 | | |
784 | 804 | | |
785 | 805 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
0 commit comments