MSFN Forum: [BUG+FIX] Saving after command drag&drop breaks the commands list - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[BUG+FIX] Saving after command drag&drop breaks the commands list Rate Topic: -----

#1 User is offline   Francesco 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 394
  • Joined: 20-March 04

Posted 18 May 2012 - 07:31 PM

Cause
This is caused by two different issues:
  • The function that populates the command textbox searches the array trough Id even though when drag&dropping the Id stop reflecting the current grid position.
  • When you drag&drop an item the commands array is not updated so fixing the function for populating the textbox is not enough, the array has to be refreshed after each drag&drop as well.

Fix
In configwizard.js replace
CommandsGrid.attachEvent("onRowSelect",FillInCommand);


with

		CommandsGrid.attachEvent("onRowSelect",function (rowId) {
			FillInCommand(CommandsGrid.getRowIndex(rowId));
		});
		CommandsGrid.attachEvent("onDrop", ExtractCommandsValues);



Please report if this change breaks anything.

This post has been edited by Francesco: 18 May 2012 - 07:31 PM



#2 User is online   Kelsenellenelvian 

  • WPI Guru
  • Group: Developers
  • Posts: 8,323
  • Joined: 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 19 May 2012 - 01:53 PM

added in 8.5

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy