rework splitter implementation

This commit is contained in:
Eduardo Bart
2012-03-23 00:06:00 -03:00
parent 79a1d66f3f
commit b301aa1a2b
4 changed files with 51 additions and 56 deletions

View File

@@ -714,6 +714,10 @@ void UIWidget::setLayout(const UILayoutPtr& layout)
void UIWidget::setRect(const Rect& rect)
{
if(rect.width() > 8192 || rect.height() > 8192) {
logError("attempt to set huge rect size (", rect,") for ", m_id);
return;
}
// only update if the rect really changed
Rect oldRect = m_rect;
if(rect == oldRect)

View File

@@ -49,7 +49,7 @@ namespace Proto {
#if PROTOCOL>=861
constexpr int NumViolationReasons = 19;
#elif PROTOCOL==860
#elif PROTOCOL>=860
constexpr int NumViolationReasons = 20;
#endif
@@ -246,7 +246,7 @@ namespace Proto {
ServerSpeakRVRAnswer,
ServerSpeakRVRContinue,
ServerSpeakChannelRed2
#elif PROTOCOL==860
#elif PROTOCOL>=860
ServerSpeakSay = 1,
ServerSpeakWhisper,
ServerSpeakYell,
@@ -269,7 +269,7 @@ namespace Proto {
};
enum MessageTypes {
#if PROTOCOL>=862
#if PROTOCOL>=861
MessageConsoleOrange = 13,
MessageConsoleOrange2,
MessageWarning,
@@ -280,7 +280,7 @@ namespace Proto {
MessageStatusSmall,
MessageConsoleBlue,
MessageConsoleRed
#elif PROTOCOL==860
#elif PROTOCOL>=860
MessageConsoleRed = 18,
MessageConsoleOrange,
MessageConsoleOrange2,