Skip to content

Commit 452d731

Browse files
authored
Merge pull request bruderstein#79 from ClaudiaFrank/feature_77
implements feature request bruderstein#77
2 parents edaddbc + cec4739 commit 452d731

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

PythonScript/src/PythonScript.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ static tstring g_previousScript;
4646

4747
static bool g_infoSet = false;
4848
static bool g_initialised = false;
49+
static bool previousScript_clicked = false;
4950

5051
// Scripts on the menu
5152
static std::vector<std::string*> g_menuScripts;
@@ -532,7 +533,7 @@ static void runScript(const TCHAR *filename, bool synchronous, HANDLE completedE
532533

533534
// If a menu item was clicked (or assumed to be, see runScript(int))
534535
// and either control held down, and shift + alt are not, then edit the file
535-
if (MenuManager::s_menuItemClicked
536+
if ((MenuManager::s_menuItemClicked || previousScript_clicked)
536537
&& (keyState[VK_CONTROL] & 0x80)
537538
&& ((keyState[VK_SHIFT] & 0x80) == 0)
538539
&& ((keyState[VK_MENU] & 0x80) == 0))
@@ -713,5 +714,7 @@ static void doHelp()
713714

714715
static void previousScript()
715716
{
717+
previousScript_clicked = true;
716718
runScript(g_previousScript.c_str(), false);
719+
previousScript_clicked = false;
717720
}

0 commit comments

Comments
 (0)