When running new version of Grafx2 for first time, new shortcuts take priority over user's. Useful for the space=pan (issue 233) that replaces default space=left-click. Also improved pan to display updated xy coords.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1902 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
cbcb7a6b8f
commit
f77f38e238
@ -270,17 +270,17 @@ void Window_set_shortcut(int action_id)
|
|||||||
void Remove_duplicate_shortcuts(void)
|
void Remove_duplicate_shortcuts(void)
|
||||||
{
|
{
|
||||||
int action_1;
|
int action_1;
|
||||||
// This algorithm favors shortcuts that are first in the list.
|
// This algorithm favors shortcuts that are last in the list.
|
||||||
// The idea is that we, coders, append new shortcuts at the end with default
|
// The idea is that we, coders, append new shortcuts at the end with default
|
||||||
// values; they should be discarded if user has chosen the key first.
|
// values; they take priority as they are new functions.
|
||||||
for (action_1=0; action_1<NB_SHORTCUTS-1; action_1++)
|
for (action_1=NB_SHORTCUTS-1; action_1>0; action_1--)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
word *shortcut_1 = Shortcut(Ordering[action_1]);
|
word *shortcut_1 = Shortcut(Ordering[action_1]);
|
||||||
for (n=0; n<2; n++)
|
for (n=0; n<2; n++)
|
||||||
{
|
{
|
||||||
int action_2;
|
int action_2;
|
||||||
for (action_2=action_1+1; action_2<NB_SHORTCUTS; action_2++)
|
for (action_2=0; action_2<action_1; action_2++)
|
||||||
{
|
{
|
||||||
if (shortcut_1[n]!=0)
|
if (shortcut_1[n]!=0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4093,7 +4093,10 @@ void Pan_view_12_2(void)
|
|||||||
Scroll_screen(start_x-Paintbrush_X,start_y-Paintbrush_Y);
|
Scroll_screen(start_x-Paintbrush_X,start_y-Paintbrush_Y);
|
||||||
}
|
}
|
||||||
// The "scroll" functions have actualized the Paintbrush_X and Y
|
// The "scroll" functions have actualized the Paintbrush_X and Y
|
||||||
|
if (Paintbrush_X!=start_x || Paintbrush_Y!=start_y)
|
||||||
|
{
|
||||||
|
Print_coordinates();
|
||||||
|
}
|
||||||
Operation_push(Paintbrush_X);
|
Operation_push(Paintbrush_X);
|
||||||
Operation_push(Paintbrush_Y);
|
Operation_push(Paintbrush_Y);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user