forked from Mirrors/openclonk
editor/win32: Get id to reload on demand instead of every selection change
parent
a2015e0db1
commit
49241e4512
|
@ -75,7 +75,6 @@ void C4PropertyDlg::Default()
|
|||
{
|
||||
state->Default();
|
||||
Active = false;
|
||||
//idSelectedDef=C4ID::None;
|
||||
}
|
||||
|
||||
void C4PropertyDlg::Clear()
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -44,8 +44,6 @@ public:
|
|||
bool Open();
|
||||
void Update(C4ObjectList &rSelection);
|
||||
bool Active;
|
||||
public: // ToolsDlg fields are public as well...
|
||||
C4ID idSelectedDef;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue