summaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
authorleo2006-02-28 18:15:32 +0000
committerleo2006-02-28 18:15:32 +0000
commit043531a83c079962bad699f2496850ef625a7bfa (patch)
treefab59d8473f021a0afff3ac3b7b5e2c2fd6c9b14 /win
parent97d9003d8c52f399b7e1442c7c4347d9f6adaf3e (diff)
Show piece number on the status bar.
git-svn-id: http://svn.leocad.org/trunk@501 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'win')
-rw-r--r--win/System.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/win/System.cpp b/win/System.cpp
index 47db92b..75e1f24 100644
--- a/win/System.cpp
+++ b/win/System.cpp
@@ -33,6 +33,8 @@
#include "project.h"
#include "globals.h"
#include "lc_application.h"
+#include "piece.h"
+#include "pieceinf.h"
bool lcAssert(const char* FileName, int Line, const char* Expression, const char* Description)
{
@@ -664,8 +666,15 @@ void SystemUpdateSelected(unsigned long flags, int SelectedCount, Object* Focus)
}
else if ((SelectedCount == 1) && (Focus != NULL))
{
- pFrame->SetStatusBarMessage(Focus->GetName());
- pFrame->SetMessageText(Focus->GetName());
+ char Message[256];
+
+ if (Focus->IsPiece())
+ sprintf(Message, "%s (ID: %s)", Focus->GetName(), ((Piece*)Focus)->GetPieceInfo()->m_strName);
+ else
+ strcpy(Message, Focus->GetName());
+
+ pFrame->SetStatusBarMessage(Message);
+ pFrame->SetMessageText(Message);
}
else
{