PDA

View Full Version : Bug: shift+mousewheel to change bars fails


Kral2
04-02-2005, 07:19 PM
shift+mousewheel to change bars doesn't work correctly unless "Use alternate ID ranges" is checked in "Bar options".

Without it checked (the default), it only alternates between bar 1 and 2. With it checked, it correctly lets you wheel through all of the bars.

Is there a better place to report bugs like this, like BugZilla or something?

Kral2
04-02-2005, 08:32 PM
Ok, debugged and fixed it. BarOptions has some really bizarre code in its PageUp/PageDown handlers. I really can't tell what the non-alternateid case was ever supposed to do, but it's obviously not selecting the correct bar ids. The attached patch (the forum might chew on it, but it's easy to apply by hand) fixes the pageup/pagedown cases to handle the non-alternateid case properly. You can use shift-arrows or shift-mousewheel to watch it scroll through bars 1-6 like it should, rather than 1-2 like it was.

Btw, where would I find email addresses of folks like Mugendai so I can mail stuff like this directly?


diff -ur BarOptions-orig/BOHooks.lua BarOptions/BOHooks.lua
--- BarOptions-orig/BOHooks.lua 2005-04-02 12:25:07.293375000 -0800
+++ BarOptions/BOHooks.lua 2005-04-02 12:22:40.043375000 -0800
@@ -518,15 +518,7 @@
CURRENT_ACTIONBAR_PAGE = CURRENT_ACTIONBAR_PAGE + 1;

local nextPage;



- if ((BarOptions_Config.AlternateIDs == 0) or ((BarOptions_Config.AlternateIDs == 0) and (BarOptions_Config.GroupPages == 0))) then

- --If no effecting options are enabled, behave normal

- for i=CURRENT_ACTIONBAR_PAGE, NUM_ACTIONBAR_PAGES do

- if ( VIEWABLE_ACTION_BAR_PAGES[i] ) then

- nextPage = i;

- break;

- end

- end

- elseif ((BarOptions_Config.AlternateIDs == 1) and (BarOptions_Config.GroupPages == 1)) then

+ if ((BarOptions_Config.AlternateIDs == 1) and (BarOptions_Config.GroupPages == 1)) then

--If grouping is enabled, then simply don't exceed 3 pages

if (CURRENT_ACTIONBAR_PAGE <= (NUM_ACTIONBAR_PAGES / 2)) then

nextPage = CURRENT_ACTIONBAR_PAGE;

@@ -550,23 +542,9 @@
CURRENT_ACTIONBAR_PAGE = CURRENT_ACTIONBAR_PAGE - 1;

local prevPage;



- if ((BarOptions_Config.AlternateIDs == 0) or ((BarOptions_Config.AlternateIDs == 0) and (BarOptions_Config.GroupPages == 0))) then

- --If no effecting options are enabled, behave normal

- if (CURRENT_ACTIONBAR_PAGE < 1) then

- CURRENT_ACTIONBAR_PAGE = NUM_ACTIONBAR_PAGES;

- end

-

- for i=CURRENT_ACTIONBAR_PAGE, 1, -1 do

- if ( VIEWABLE_ACTION_BAR_PAGES[i] ) then

- prevPage = i;

- break;

- end

- end

- else

- --Simply don't go below page 1

- if (CURRENT_ACTIONBAR_PAGE > 0) then

- prevPage = CURRENT_ACTIONBAR_PAGE;

- end

+ --Simply don't go below page 1

+ if (CURRENT_ACTIONBAR_PAGE > 0) then

+ prevPage = CURRENT_ACTIONBAR_PAGE;

end



if ( not prevPage ) then

@@ -627,4 +605,4 @@
end



return nil, { text };

-end
\ No newline at end of file
+end