From 27d5b2c94b8c663ec8e7fede72a0a074e139490d Mon Sep 17 00:00:00 2001 From: twanvl Date: Mon, 29 Jan 2007 14:35:19 +0000 Subject: [PATCH] removed minimum width of notes field git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@187 0fc631ac-6414-0410-93d0-97cfa31319b6 --- src/gui/control/text_ctrl.cpp | 6 +++++- src/gui/control/text_ctrl.hpp | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/control/text_ctrl.cpp b/src/gui/control/text_ctrl.cpp index 64d8eeae..a0eb0e90 100644 --- a/src/gui/control/text_ctrl.cpp +++ b/src/gui/control/text_ctrl.cpp @@ -55,7 +55,8 @@ void TextCtrl::setValue(String* value) { style->width = cs.GetWidth() - 2; style->height = cs.GetHeight() - 2; viewers.front()->getEditor()->determineSize(true); - SetMinSize(RealSize(style->width + 6, style->height + 6)); + // We don't wan to change the window size + //SetMinSize(RealSize(style->width + 6, style->height + 6)); } valueChanged(); } @@ -99,6 +100,9 @@ void TextCtrl::onSize(wxSizeEvent&) { } onChange(); } +wxSize TextCtrl::DoGetBestSize() const { + return wxSize(1,1); +} BEGIN_EVENT_TABLE(TextCtrl, DataEditor) EVT_SIZE (TextCtrl::onSize) diff --git a/src/gui/control/text_ctrl.hpp b/src/gui/control/text_ctrl.hpp index 64462301..86102bb8 100644 --- a/src/gui/control/text_ctrl.hpp +++ b/src/gui/control/text_ctrl.hpp @@ -45,6 +45,7 @@ class TextCtrl : public DataEditor { protected: virtual void onInit(); + virtual wxSize DoGetBestSize() const; private: String* value; ///< Value to edit