editor/win32: Get id to reload on demand instead of every selection change

Günther Brammer 2011-01-13 01:16:30 +01:00
parent a2015e0db1
commit 49241e4512
4 changed files with 5 additions and 7 deletions

View File

@ -75,7 +75,6 @@ void C4PropertyDlg::Default()
{
state->Default();
Active = false;
//idSelectedDef=C4ID::None;
}
void C4PropertyDlg::Clear()

View File

@ -579,8 +579,12 @@ INT_PTR CALLBACK PropertyDlgProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lPar
return true;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case IDC_BUTTONRELOADDEF:
Game.ReloadDef( Console.PropertyDlg.idSelectedDef );
{
C4Object * pObj = Console.EditCursor.GetSelection().GetObject();
if (pObj)
Game.ReloadDef(pObj->id);
return true;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
}
return false;

View File

@ -52,9 +52,6 @@ void C4PropertyDlg::Update(C4ObjectList &rSelection)
// Update info edit control
Console.PropertyDlgUpdate(this, rSelection.GetDataString());
// Store selected def
idSelectedDef=pObj->id;
// Update input control
Console.PropertyDlgSetFunctions(this, pObj);
}

View File

@ -44,8 +44,6 @@ public:
bool Open();
void Update(C4ObjectList &rSelection);
bool Active;
public: // ToolsDlg fields are public as well...
C4ID idSelectedDef;
};
#endif