editor: Immediately update information about selected objects

This avoids resetting the selection of the object list dialog. Previously,
after selecting object in the list, C4EditCursor::Execute would set the
object list selection to what the user just had selected.
Günther Brammer 2011-01-12 21:31:10 +01:00
parent b1cc96d6ce
commit c908c47ca5
2 changed files with 2 additions and 11 deletions

View File

@ -90,14 +90,6 @@ void C4EditCursor::Execute()
break; break;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
} }
// selection update
if (fSelectionChanged)
{
fSelectionChanged = false;
UpdateStatusBar();
Console.PropertyDlg.Update(Selection);
Console.ObjectListDlg.Update(Selection);
}
} }
bool C4EditCursor::Init() bool C4EditCursor::Init()
@ -213,7 +205,8 @@ void C4EditCursor::UpdateStatusBar()
void C4EditCursor::OnSelectionChanged() void C4EditCursor::OnSelectionChanged()
{ {
fSelectionChanged = true; Console.PropertyDlg.Update(Selection);
Console.ObjectListDlg.Update(Selection);
} }
bool C4EditCursor::LeftButtonDown(bool fControl) bool C4EditCursor::LeftButtonDown(bool fControl)
@ -521,7 +514,6 @@ void C4EditCursor::Default()
#endif #endif
Hold=DragFrame=DragLine=false; Hold=DragFrame=DragLine=false;
Selection.Default(); Selection.Default();
fSelectionChanged = false;
} }
void C4EditCursor::Clear() void C4EditCursor::Clear()

View File

@ -38,7 +38,6 @@ public:
~C4EditCursor(); ~C4EditCursor();
protected: protected:
bool fAltWasDown; bool fAltWasDown;
bool fSelectionChanged;
int32_t Mode; int32_t Mode;
float X,Y,X2,Y2; float X,Y,X2,Y2;
bool Hold,DragFrame,DragLine; bool Hold,DragFrame,DragLine;