Skip to content

Commit

Permalink
Palette shift bugfix + pndefault at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
PC-SUMMO\Michele Summo committed Apr 14, 2022
1 parent d171d52 commit 8952418
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define CONFIG_H

// XaoS release
#define XaoS_VERSION "4.2.1_MS_HACK"
#define XaoS_VERSION "4.2.1_MS_HACK2"

// URLs
#define HELP_URL "https://github.com/xaos-project/XaoS/wiki"
Expand Down
10 changes: 9 additions & 1 deletion src/ui-hlp/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,7 @@ static void uih_palettecolors(struct uih_context *uih, dialogparam *p){
static void uih_palettepicker(struct uih_context *uih, dialogparam *p)
{
uih_newimage(uih);
uih->manualpaletteshift = 0;
uih->palettepickerenabled = 1;
}

Expand Down Expand Up @@ -951,6 +952,12 @@ static void uih_newtonmodesffesw(struct uih_context *c)
uih_setnewtonmodesffe(c, c->fcontext->newtonmodesffe ^ 1);
}

static void uih_newfractal(struct uih_context *c)
{
uih_initstate(c);
uih_setpndefault(c, 1);
}

static int uih_cyclingselected(struct uih_context *c)
{
if (c == NULL)
Expand Down Expand Up @@ -1282,7 +1289,8 @@ void uih_registermenus_i18n(void)
UIH_TEXTCENTER, uih_xtextselected);
MENUINTRB_I("xtextpos", NULL, "Right", "xtexteight", UI, uih_setxtextpos,
UIH_TEXTRIGHT, uih_xtextselected);
MENUNOP_I("file", NULL, TR("Menu", "New"), "initstate", 0, uih_initstate);
MENUNOP_I("file", NULL, TR("Menu", "Initstate"), "initstate", MENUFLAG_NOMENU, uih_initstate);
MENUNOP_I("file", NULL, TR("Menu", "New"), "newfractal", 0, uih_newfractal);
MENUDIALOG_I("file", NULL, TR("Menu", "Open"), "loadpos",
MENUFLAG_INTERRUPT | MENUFLAG_NOPLAY, uih_loadfile,
loaddialog);
Expand Down
1 change: 1 addition & 0 deletions src/ui-hlp/ui_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2115,6 +2115,7 @@ uih_mkcontext(int flags, struct image *image,
sffe_parse(&uih->fcontext->userformula, USER_FORMULA);
sffe_parse(&uih->fcontext->userinitial, "");
#endif
uih->fcontext->pndefault = 1;
uih_setformula(uih, 0);
uih_saveundo(uih);
return (uih);
Expand Down

0 comments on commit 8952418

Please sign in to comment.